LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>, Hillf Danton <hdanton@sina.com>,
syzbot <syzbot+9937dc42271cd87d4b98@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
Eric Sandeen <sandeen@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Luis Chamberlain <mcgrof@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [syzbot] WARNING in internal_create_group
Date: Thu, 12 Aug 2021 08:18:39 +0200 [thread overview]
Message-ID: <20210812061839.GA26497@lst.de> (raw)
In-Reply-To: <39ac87a8-42ac-acf7-11eb-ba0b6a9f4a95@gmail.com>
On Thu, Aug 12, 2021 at 12:37:08AM +0300, Pavel Skripkin wrote:
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -1725,7 +1725,17 @@ static int nbd_dev_add(int index)
> refcount_set(&nbd->refs, 1);
> INIT_LIST_HEAD(&nbd->list);
> disk->major = NBD_MAJOR;
> +
> + /* Too big first_minor can cause duplicate creation of
> + * sysfs files/links, since first_minor will be truncated to
> + * byte in __device_add_disk().
> + */
> disk->first_minor = index << part_shift;
> + if (disk->first_minor > 0xff) {
> + err = -EINVAL;
> + goto out_free_idr;
> + }
> +
> disk->minors = 1 << part_shift;
> disk->fops = &nbd_fops;
> disk->private_data = nbd;
>
>
> What to do you think about it?
This sounds reasonable and looks good to me.
next prev parent reply other threads:[~2021-08-12 6:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 18:57 [syzbot] WARNING in internal_create_group syzbot
2021-07-20 18:53 ` syzbot
[not found] ` <20210721033703.949-1-hdanton@sina.com>
2021-07-21 4:30 ` Christoph Hellwig
2021-08-11 21:37 ` Pavel Skripkin
2021-08-12 6:18 ` Christoph Hellwig [this message]
2021-09-16 6:55 ` Joel Stanley
2021-09-16 8:05 ` Greg Kroah-Hartman
2021-09-16 10:56 ` Pavel Skripkin
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=20210812061839.GA26497@lst.de \
--to=hch@lst.de \
--cc=gregkh@linuxfoundation.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=paskripkin@gmail.com \
--cc=sandeen@redhat.com \
--cc=syzbot+9937dc42271cd87d4b98@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).