Re: [PATCH V2] oslib: Fix blkzoned_get_max_open_zones()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/1/21 12:41 AM, Damien Le Moal wrote:
> When the kernel does not have the sysfs atttribute file
> queue/max_open_zones, blkzoned_get_max_open_zones() returns success
> without initializing the max_open_zones value to 0 to indicate to the
> caller (zbd_get_max_open_zones() in zbd.c) that the device limit is
> unknown. If the max_open_zones variable in zbd_get_max_open_zones() is
> not already 0 (depending on the memory status), the missing
> initialization in blkzoned_get_max_open_zones() can cause errors or
> misbehavior as an incorrect, random, limit may be used.
> 
> Fix this by always initializing max_open_zones to 0 when the
> max_open_zones sysfs attribute file does not exist.

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux