[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <164873704446.46490.778795283218997371.b4-ty@kernel.dk>
Date: Thu, 31 Mar 2022 08:30:44 -0600
From: Jens Axboe <axboe@...nel.dk>
To: josef@...icpanda.com, Zhang Wensheng <zhangwensheng5@...wei.com>
Cc: linux-block@...r.kernel.org, nbd@...er.debian.org,
linux-kernel@...r.kernel.org, yukuai3@...wei.com
Subject: Re: [PATCH -next] nbd: fix possible overflow on 'first_minor' in nbd_dev_add()
On Thu, 10 Mar 2022 17:32:24 +0800, 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.
>
>
> [...]
Applied, thanks!
[1/1] nbd: fix possible overflow on 'first_minor' in nbd_dev_add()
commit: 6d35d04a9e18990040e87d2bbf72689252669d54
Best regards,
--
Jens Axboe
Powered by blists - more mailing lists