* [patch] udf: fix udf_load_pvoldesc()
@ 2015-05-20 8:13 Dan Carpenter
2015-05-21 13:21 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-05-20 8:13 UTC (permalink / raw)
To: Jan Kara, Fabian Frederick; +Cc: linux-kernel, kernel-janitors
There are some missing braces here which means this function never
succeeds.
Fixes: e9d4cf411f75 ('udf: improve error management in udf_CS0toUTF8()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/udf/super.c b/fs/udf/super.c
index c6a8f5f..b96f190 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -937,12 +937,13 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
}
- if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
+ if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) {
ret = udf_CS0toUTF8(outstr, instr);
if (ret < 0)
goto out_bh;
udf_debug("volSetIdent[] = '%s'\n", outstr->u_name);
+ }
ret = 0;
out_bh:
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] udf: fix udf_load_pvoldesc()
2015-05-20 8:13 [patch] udf: fix udf_load_pvoldesc() Dan Carpenter
@ 2015-05-21 13:21 ` Jan Kara
2015-05-21 15:04 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2015-05-21 13:21 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Jan Kara, Fabian Frederick, linux-kernel, kernel-janitors
On Wed 20-05-15 11:13:15, Dan Carpenter wrote:
> There are some missing braces here which means this function never
> succeeds.
>
> Fixes: e9d4cf411f75 ('udf: improve error management in udf_CS0toUTF8()')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for the patch. Added to my tree. Actually, the missing parenthesis
don't cause any real issues since almost all volumes have volIdent and thus
ret gets set to 0 in the previous if. But it's certainly good to fix.
Honza
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index c6a8f5f..b96f190 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -937,12 +937,13 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
> udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
> }
>
> - if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
> + if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) {
> ret = udf_CS0toUTF8(outstr, instr);
> if (ret < 0)
> goto out_bh;
>
> udf_debug("volSetIdent[] = '%s'\n", outstr->u_name);
> + }
>
> ret = 0;
> out_bh:
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] udf: fix udf_load_pvoldesc()
2015-05-21 13:21 ` Jan Kara
@ 2015-05-21 15:04 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-05-21 15:04 UTC (permalink / raw)
To: Jan Kara; +Cc: Fabian Frederick, linux-kernel, kernel-janitors
On Thu, May 21, 2015 at 03:21:56PM +0200, Jan Kara wrote:
> On Wed 20-05-15 11:13:15, Dan Carpenter wrote:
> > There are some missing braces here which means this function never
> > succeeds.
> >
> > Fixes: e9d4cf411f75 ('udf: improve error management in udf_CS0toUTF8()')
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Thanks for the patch. Added to my tree. Actually, the missing parenthesis
> don't cause any real issues since almost all volumes have volIdent and thus
> ret gets set to 0 in the previous if. But it's certainly good to fix.
Ah... I didn't read carefully. Thanks.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-21 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 8:13 [patch] udf: fix udf_load_pvoldesc() Dan Carpenter
2015-05-21 13:21 ` Jan Kara
2015-05-21 15:04 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).