On Wed, Jun 20, 2012 at 03:43:02PM -0700, [email protected] wrote: > > The patch titled > Subject: ocfs2: fix NULL pointer dereferrence in > __ocfs2_change_file_space() > has been added to the -mm tree. Its filename is > ocfs2-fix-null-pointer-dereferrence-in-__ocfs2_change_file_space.patch > > Before you just go and hit "reply", please: > a) Consider who else should be cc'ed > b) Prefer to cc a suitable mailing list as well > c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/SubmitChecklist when testing your code *** > > The -mm tree is included into linux-next and is updated > there every 3-4 working days > > ------------------------------------------------------ > From: Luis Henriques <[email protected]> > Subject: ocfs2: fix NULL pointer dereferrence in __ocfs2_change_file_space() > > As ocfs2_fallocate() will invoke __ocfs2_change_file_space() with a NULL > as the first parameter (file), it may trigger a NULL pointer dereferrence > due to a missing check. > > Addresses http://bugs.launchpad.net/bugs/1006012 > > Signed-off-by: Luis Henriques <[email protected]> > Reported-by: Bret Towe <[email protected]> > Cc: Sunil Mushran <[email protected]> > Cc: Joel Becker <[email protected]> > Cc: Mark Fasheh <[email protected]> > Cc: <[email protected]> > Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Joel Becker <[email protected]> > --- > > fs/ocfs2/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -puN > fs/ocfs2/file.c~ocfs2-fix-null-pointer-dereferrence-in-__ocfs2_change_file_space > fs/ocfs2/file.c > --- > a/fs/ocfs2/file.c~ocfs2-fix-null-pointer-dereferrence-in-__ocfs2_change_file_space > +++ a/fs/ocfs2/file.c > @@ -1950,7 +1950,7 @@ static int __ocfs2_change_file_space(str > if (ret < 0) > mlog_errno(ret); > > - if (file->f_flags & O_SYNC) > + if (file && (file->f_flags & O_SYNC)) > handle->h_sync = 1; > > ocfs2_commit_trans(osb, handle); > _ > Subject: Subject: ocfs2: fix NULL pointer dereferrence in > __ocfs2_change_file_space() > > Patches currently in -mm which might be from [email protected] are > > ocfs2-fix-null-pointer-dereferrence-in-__ocfs2_change_file_space.patch > -- "If the human brain were so simple we could understand it, we would be so simple that we could not." - W. A. Clouston http://www.jlbec.org/ [email protected] -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
