lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88ec9cac-f2ad-4728-6ce0-eb4358846463@huawei.com>
Date:   Tue, 15 Mar 2022 15:11:09 +0000
From:   John Garry <john.garry@...wei.com>
To:     Bart Van Assche <bvanassche@....org>,
        <damien.lemoal@...nsource.wdc.com>, <jejb@...ux.ibm.com>,
        <martin.petersen@...cle.com>, <ming.lei@...hat.com>, <hch@....de>,
        <hare@...e.de>
CC:     <linux-ide@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-scsi@...r.kernel.org>, <martin.wilck@...e.com>
Subject: Re: [PATCH 1/2] scsi: core: Fix sbitmap depth in
 scsi_realloc_sdev_budget_map()

On 15/03/2022 14:33, Bart Van Assche wrote:
>> sbitmap sb_backup;
>> +    depth = min_t(unsigned int, depth, 
>> scsi_device_max_queue_depth(sdev));
>> +
>>       /*
>>        * realloc if new shift is calculated, which is caused by setting
>>        * up one new default queue depth after calling ->slave_configure
>> @@ -245,6 +247,9 @@ static int scsi_realloc_sdev_budget_map(struct 
>> scsi_device *sdev,
>>                   scsi_device_max_queue_depth(sdev),
>>                   new_shift, GFP_KERNEL,
>>                   sdev->request_queue->node, false, true);
>> +    if (!ret)
>> +        sbitmap_resize(&sdev->budget_map, depth);
> 
> Hmm ... why to call both sbitmap_init_node() and sbitmap_resize() 
> instead of combining both calls into a single call with the proper depth?

Hi Bart,

Is the user wants to change the queue depth later via sysfs we do not 
reallocate the sbitmap then. So we need to ensure that the size we 
reallocate here will satisfy the scsi device max depth. I'm referencing 
scsi_change_queue_depth() for this.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ