lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1HP3eB-0001nV-00@dorka.pomaz.szeredi.hu>
Date:	Wed, 07 Mar 2007 22:26:07 +0100
From:	Miklos Szeredi <miklos@...redi.hu>
To:	akpm@...ux-foundation.org
CC:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [patch 8/8] consolidate generic_writepages and mpage_writepages
 fix

> > From: Miklos Szeredi <mszeredi@...e.cz>
> > 
> > Fix NULL pointer dereference in __mpage_writepage.  This probably
> > doesn't matter in practice, but this is the original behavior.
> > 
> > Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> > ---
> > 
> > Index: linux/fs/mpage.c
> > ===================================================================
> > --- linux.orig/fs/mpage.c	2007-03-06 17:30:09.000000000 +0100
> > +++ linux/fs/mpage.c	2007-03-06 17:30:33.000000000 +0100
> > @@ -662,7 +662,7 @@ confused:
> >  	if (bio)
> >  		bio = mpage_bio_submit(WRITE, bio);
> >  
> > -	if (mpd->use_writepage) {
> > +	if (mpd->use_writepage && mapping->a_ops->writepage) {
> >  		ret = mapping->a_ops->writepage(page, wbc);
> >  	} else {
> >  		ret = -EAGAIN;
> > 
> > --
> 
> I'm inclined to leave the code as-is, as an optimisation.  If it
> blows up then it'd be cleaner to change the caller (mpage_writepages)
> to do
> 
> 	.use_writepage = (writepage != NULL),
> 
> ?

It seems all in-tree uses of mpage_writepages define ->writepage() so
it should be safe to drop this patch.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ