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