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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 1 Mar 2019 12:51:38 -0600 From: Eric Sandeen <esandeen@...hat.com> To: Lukas Czerner <lczerner@...hat.com>, linux-ext4@...r.kernel.org Subject: Re: [PATCH] ext4: Add missing brelse() in add_new_gdb_meta_bg() On 3/1/19 11:15 AM, Lukas Czerner wrote: > Currently in add_new_gdb_meta_bg() there is a missing brelse of gdb_bh > in case ext4_journal_get_write_access() fails. Fix it. > > Fixes: 61a9c11e5e7a ("ext4: add missing brelse() add_new_gdb_meta_bg()'s error path") > Signed-off-by: Lukas Czerner <lczerner@...hat.com> I'm going to refrain from actual review because I've gotten fairly far away from ext4 code, but OTOH I did bring this question to Lukas, so I'd also like to ask whether this error handling is problematic in several other callsites... my meager pattern recognition skills while looking over the code make me go "hmmmm...." a little but I may well be missing the big picture of how these buffer heads are managed. Thanks, -Eric > --- > fs/ext4/resize.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c > index 48421de803b7..e945f412cf58 100644 > --- a/fs/ext4/resize.c > +++ b/fs/ext4/resize.c > @@ -937,6 +937,8 @@ static int add_new_gdb_meta_bg(struct super_block *sb, > kvfree(o_group_desc); > BUFFER_TRACE(gdb_bh, "get_write_access"); > err = ext4_journal_get_write_access(handle, gdb_bh); > + if (err) > + brelse(gdb_bh); > return err; > } > >
Powered by blists - more mailing lists