#1498 HIGH Future : vserver needs cleanup

Zarro Boogs per Child bugtracker at laptop.org
Thu Oct 25 09:56:18 EDT 2007


#1498: vserver needs cleanup
---------------------+------------------------------------------------------
  Reporter:  jg      |       Owner:  dilinger      
      Type:  task    |      Status:  new           
  Priority:  high    |   Milestone:  Future Release
 Component:  kernel  |     Version:                
Resolution:          |    Keywords:  security      
  Verified:  0       |  
---------------------+------------------------------------------------------

Comment(by dilinger):

 If the nested inlines that I saw were only 1 line of code each (also note
 that it was a mix of macros and inlines), it wouldn't be a problem.  They
 weren't.  For example, the things in vserver/limit_int.h:

 {{{
 static inline void __vx_add_cres(struct vx_info *vxi,
         int res, int amount, void *_data, char *_file, int _line)
 {
         if (VXD_RCRES_COND(res))
                 vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
                         (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
                         (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
                         amount, _data, _file, _line);
         if (amount == 0)
                 return;
         if (!vxi)
                 return;
         __rlim_add(&vxi->limit, res, amount);
 }
 }}}

 Aside from what CodingStyle says, it makes debugging really difficult to
 have to deal w/ that (__rlim_add is a #define, which maps to
 atomic_long_add, which is probably an inline of atomic64_add or atomic_add
 (arch-dependent).. All of which makes me want to cry.  And that's not even
 the one I came across while debugging last week..

-- 
Ticket URL: <https://dev.laptop.org/ticket/1498#comment:10>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list