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
| ||
|
Date: Wed, 2 Oct 2013 12:59:38 -0700 From: Brian Norris <computersforpeace@...il.com> To: Artem Bityutskiy <dedekind1@...il.com> Cc: Adrian Hunter <adrian.hunter@...el.com>, yongjun_wei@...ndmicro.com.cn, "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>, Linux Kernel <linux-kernel@...r.kernel.org>, Wei Yongjun <weiyj.lk@...il.com> Subject: Re: [PATCH] UBIFS: fix error return code in ubifs_remount_rw() and ubifs_fill_super() Bump, Artem? I'm cleaning out my old email, and this patch looks obviously correct. On Thu, Jun 6, 2013 at 7:17 PM, Wei Yongjun <weiyj.lk@...il.com> wrote: > From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn> > > Fix to return -ENOMEM in the kmalloc() and d_make_root() error handling > case instead of 0, as done elsewhere in those functions. > > Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn> > --- > fs/ubifs/super.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c > index f21acf0..673b4bc 100644 > --- a/fs/ubifs/super.c > +++ b/fs/ubifs/super.c > @@ -1629,8 +1629,10 @@ static int ubifs_remount_rw(struct ubifs_info *c) > } > > c->write_reserve_buf = kmalloc(COMPRESSED_DATA_NODE_BUF_SZ, GFP_KERNEL); > - if (!c->write_reserve_buf) > + if (!c->write_reserve_buf) { > + err = -ENOMEM; > goto out; > + } > > err = ubifs_lpt_init(c, 0, 1); > if (err) > @@ -2063,8 +2065,10 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) > } > > sb->s_root = d_make_root(root); > - if (!sb->s_root) > + if (!sb->s_root) { > + err = -ENOMEM; > goto out_umount; > + } > > mutex_unlock(&c->umount_mutex); > return 0; > > -- 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