Re: 2.6.22-rc6(mm1) Unable to handle kernel NULL pointer dereference- git-bisect result

From: Linus Torvalds
Date: Sun Jul 08 2007 - 14:39:19 EST




On Sun, 8 Jul 2007, Linus Torvalds wrote:
>
> This would seem to be the minimal change, and I think it's right.

Side note: I considered just changing do_utimes() to use
ATIME_SET/MTIME_SET instead, which would simplify the logic a lot..

But it turns out that the semantics for A/MTIME_SET is that only the owner
of the file can do that. So the "!times" case is simply _fundamentally_
different from a permissions check standpoint, and there we have to check
for "writable" rather than anything else (although ownership will override
it).

So rather than simplify the thing, I had to add code. Oh, well.

I do think that it would be even nicer to just have a function that fills
in the "struct nameidata" from the dfd. I think we should be able to: the
"struct file" really does have the "f_path" thing with both dentry and mnt
information, and that would clean up that whole ugly "filepointer-vs-nd"
thing a lot.

That would be an "Al cleanup", though. What do you think, Al?

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