mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhang, Qiang" <Qiang.Zhang@windriver.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	"clm@fb.com" <clm@fb.com>,
	"josef@toxicpanda.com" <josef@toxicpanda.com>,
	"dsterba@suse.com" <dsterba@suse.com>,
	"syzbot+582e66e5edf36a22c7b0@syzkaller.appspotmail.com" 
	<syzbot+582e66e5edf36a22c7b0@syzkaller.appspotmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 回复: [PATCH] btrfs: Fix missing close devices
Date: Mon, 21 Sep 2020 09:14:06 +0000	[thread overview]
Message-ID: <BYAPR11MB2632211F4D65A009DAF5D507FF3A0@BYAPR11MB2632.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SN4PR0401MB3598AD645D54CF397612EE429B3A0@SN4PR0401MB3598.namprd04.prod.outlook.com>



________________________________________
发件人: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
发送时间: 2020年9月21日 16:52
收件人: Zhang, Qiang; clm@fb.com; josef@toxicpanda.com; dsterba@suse.com
抄送: linux-btrfs@vger.kernel.org; linux-kernel@vger.kernel.org
主题: Re: [PATCH] btrfs: Fix missing close devices

On 21/09/2020 10:27, qiang.zhang@windriver.com wrote:
> From: Zqiang <qiang.zhang@windriver.com>
>
> When the btrfs fill super error, we should first close devices and
> then call deactivate_locked_super func to free fs_info.
>
> Signed-off-by: Zqiang <qiang.zhang@windriver.com>
> ---
>  fs/btrfs/super.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 8840a4fa81eb..3bfd54e8f388 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1675,6 +1675,7 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type,
>               error = security_sb_set_mnt_opts(s, new_sec_opts, 0, NULL);
>       security_free_mnt_opts(&new_sec_opts);
>       if (error) {
> +             btrfs_close_devices(fs_devices);
>               deactivate_locked_super(s);
>               return ERR_PTR(error);
>       }
>

>I think this is the fix for the syzkaller issue:
>Reported-by: syzbot+582e66e5edf36a22c7b0@syzkaller.appspotmail.com

Please  try this patch.

  reply	other threads:[~2020-09-21  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21  8:26 qiang.zhang
2020-09-21  8:52 ` Johannes Thumshirn
2020-09-21  9:14   ` Zhang, Qiang [this message]
2020-09-21  9:17     ` 回复: " Johannes Thumshirn
2020-09-23  6:03       ` 回复: " Zhang, Qiang
2020-09-23  8:17         ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR11MB2632211F4D65A009DAF5D507FF3A0@BYAPR11MB2632.namprd11.prod.outlook.com \
    --to=qiang.zhang@windriver.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+582e66e5edf36a22c7b0@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®