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] [day] [month] [year] [list]
Message-id: <000001cf4245$5f848250$1e8d86f0$@samsung.com>
Date:	Tue, 18 Mar 2014 08:59:08 +0800
From:	Chao Yu <chao2.yu@...sung.com>
To:	jaegeuk.kim@...sung.com
Cc:	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: RE: [f2fs-dev] [PATCH] f2fs: fix incorrect parsing with option string

Hi,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@...sung.com]
> Sent: Tuesday, March 18, 2014 8:33 AM
> To: Chao Yu
> Cc: linux-f2fs-devel@...ts.sourceforge.net; linux-fsdevel@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Subject: Re: [f2fs-dev] [PATCH] f2fs: fix incorrect parsing with option string
> 
> Hi,
> 
> 2014-03-17 (월), 17:40 +0800, Chao Yu:
> > Previously 'background_gc={on***,off***}' is being parsed as correct option,
> > with this patch we cloud fix the trivial bug in mount process.
> >
> > Signed-off-by: Chao Yu <chao2.yu@...sung.com>
> > ---
> >  fs/f2fs/super.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 057a3ef..6597290 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -258,9 +258,9 @@ static int parse_options(struct super_block *sb, char *options)
> >
> >  			if (!name)
> >  				return -ENOMEM;
> > -			if (!strncmp(name, "on", 2))
> > +			if (!strncmp(name, "on", strlen(name)))
> 
> What about 'background_gc=o'?
> Need to check strlen(name) == 2...

Oh, you're right. I will fix it and send v2 patch.
Thanks for your review. :)

> Thanks,
> 
> >  				set_opt(sbi, BG_GC);
> > -			else if (!strncmp(name, "off", 3))
> > +			else if (!strncmp(name, "off", strlen(name)))
> >  				clear_opt(sbi, BG_GC);
> >  			else {
> >  				kfree(name);
> 
> --
> Jaegeuk Kim
> Samsung

--
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