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: Wed, 8 Jul 2020 16:33:43 +0530 From: Ritesh Harjani <riteshh@...ux.ibm.com> To: "zhangyi (F)" <yi.zhang@...wei.com>, linux-ext4@...r.kernel.org Cc: tytso@....edu, jack@...e.cz, jiufei.xue@...ux.alibaba.com Subject: Re: [PATCH] jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock() On 6/20/20 11:49 AM, zhangyi (F) wrote: > jbd2_write_superblock() is under the buffer lock of journal superblock > before ending that superblock write, so add a missing unlock_buffer() in > in the error path before submitting buffer. > > Fixes: 742b06b5628f ("jbd2: check superblock mapped prior to committing") > Signed-off-by: zhangyi (F) <yi.zhang@...wei.com> > Cc: stable@...nel.org LGTM, feel free to add Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com> > --- > fs/jbd2/journal.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index a49d0e670ddf..55c4ec4edf96 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -1366,8 +1366,10 @@ static int jbd2_write_superblock(journal_t *journal, int write_flags) > int ret; > > /* Buffer got discarded which means block device got invalidated */ > - if (!buffer_mapped(bh)) > + if (!buffer_mapped(bh)) { > + unlock_buffer(bh); > return -EIO; > + } > > trace_jbd2_write_superblock(journal, write_flags); > if (!(journal->j_flags & JBD2_BARRIER)) >
Powered by blists - more mailing lists