lkml.org 
[lkml]   [2010]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] proc: warn if registering world writeable files
On Thu, Dec 16, 2010 at 04:26:10PM -0500, Dave Jones wrote:
> On Thu, Dec 16, 2010 at 10:32:17PM +0200, Alexey Dobriyan wrote:
> > + WARN_ON(S_ISREG(mode) && (mode & S_IWOTH));
> > ent->mode = mode;
> > ent->nlink = nlink;
> > atomic_set(&ent->count, 1);
>
> Not sure about this. For the reason I mentioned in the checkpatch diff
> that this is "usually" a problem. There may be some use cases where
> it may actually be ok.
>
> (I'm having a hard time thinking up a justification though tbh)

Me too.

If it's for quick debugging, one can reassign ->mode after registering and
escape the warning.


\
 
 \ /
  Last update: 2010-12-16 23:07    [W:0.044 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site