[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <263199dd-34e4-36ff-51ef-23a8f4bbe5b2@kernel.dk>
Date: Wed, 6 Apr 2022 06:55:32 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Zhang Wensheng <zhangwensheng5@...wei.com>, josef@...icpanda.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
nbd@...er.debian.org
Subject: Re: [PATCH -next] nbd: fix possible overflow on 'first_minor' in
nbd_dev_add()
On 4/6/22 5:24 AM, Zhang Wensheng wrote:
> When 'index' is a big numbers, it may become negative which forced
> to 'int'. then 'index << part_shift' might overflow to a positive
> value that is not greater than '0xfffff', then sysfs might complains
> about duplicate creation. Because of this, move the 'index' judgment
> to the front will fix it and be better.
What's changed in this version? Always add a v2 to both the subject
line and below the '---' so that folks reviewing this will know
what changes you made since the last posting.
--
Jens Axboe
Powered by blists - more mailing lists