Messages in this thread | | | Date | Sun, 7 Dec 2003 05:42:00 -0800 | From | William Lee Irwin III <> | Subject | Re: [PATCH] FIx 'noexec' behavior |
| |
On Sun, Dec 07, 2003 at 02:39:06PM +0100, Alex Riesen wrote: > I had to put a check for 'file' (as Ulrich suggested). > Otherwise it deadlocks again. > Is it possible for ->f_vfsmnt to be NULL at all? Should it be tested? > diff -Nru a/mm/mmap.c b/mm/mmap.c > --- a/mm/mmap.c Sun Dec 7 14:37:33 2003 > +++ b/mm/mmap.c Sun Dec 7 14:37:33 2003 > @@ -478,7 +478,7 @@ > if (file && (!file->f_op || !file->f_op->mmap)) > return -ENODEV; > > - if ((prot & PROT_EXEC) && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)) > + if ((prot & PROT_EXEC) && file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)) > return -EPERM; > > if (!len)
This does not resemble the code I was looking at from current bk.
-- wli - 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/
| |