lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fix UDF-FS potentially dereferencing null


On Sat, 17 Apr 2004, Dave Jones wrote:
>
> And there's a *lot* of them. Those half dozen or so patches earlier were
> results of just a quick random skim of the list the coverity folks came up with.
>
> It'll take a lot of effort to 'fix' them all, and given the non-severity
> of a lot of them, I'm not convinced it's worth the effort.

Just for the fun of it, I added a "safe" attribute to sparse (hey, it was
trivial), and made it warn if you test a safe variable.

You can do

#define __safe __attribute__((safe))

static struct denty *
udf_lookup(struct inode * __safe dir,
struct dentry * __safe dentry,
struct nameidata * __safe nd);

or

int notify_change(struct dentry * dentry, struct iattr * attr)
{
struct inode * __safe inode = dentry->d_inode;

and it should actually warn you if you test such a safe variable:

warning: fs/attr.c:138:6: testing a 'safe expression'

Ehh?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.087 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site