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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 18 Nov 2023 08:30:56 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Yury Norov <yury.norov@...il.com>, linux-kernel@...r.kernel.org,
        Sathya Prakash Veerichetty <sathya.prakash@...adcom.com>,
        Kashyap Desai <kashyap.desai@...adcom.com>,
        Sumit Saxena <sumit.saxena@...adcom.com>,
        Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Nilesh Javali <njavali@...vell.com>,
        Manish Rangankar <mrangankar@...vell.com>,
        GR-QLogic-Storage-Upstream@...vell.com,
        mpi3mr-linuxdrv.pdl@...adcom.com, linux-scsi@...r.kernel.org
Cc:     Jan Kara <jack@...e.cz>,
        Mirsad Todorovac <mirsad.todorovac@....unizg.hr>,
        Matthew Wilcox <willy@...radead.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
        Alexey Klimov <klimov.linux@...il.com>
Subject: Re: [PATCH 15/34] scsi: use atomic find_bit() API where appropriate

On 11/18/23 07:50, Yury Norov wrote:
>   drivers/scsi/mpi3mr/mpi3mr_os.c | 21 ++++++---------------
>   drivers/scsi/qedi/qedi_main.c   |  9 +--------
>   drivers/scsi/scsi_lib.c         |  5 ++---
>   3 files changed, 9 insertions(+), 26 deletions(-)

One patch for each of the above source files please. mpi3mr and qedi are
both SCSI drivers. scsi_lib.c is a source file from the SCSI core.

> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index cf3864f72093..4460a37f4864 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2499,9 +2499,8 @@ void scsi_evt_thread(struct work_struct *work)
>   
>   	sdev = container_of(work, struct scsi_device, event_work);
>   
> -	for (evt_type = SDEV_EVT_FIRST; evt_type <= SDEV_EVT_LAST; evt_type++)
> -		if (test_and_clear_bit(evt_type, sdev->pending_events))
> -			sdev_evt_send_simple(sdev, evt_type, GFP_KERNEL);
> +	for_each_test_and_clear_bit(evt_type, sdev->pending_events, SDEV_EVT_LAST)
> +		sdev_evt_send_simple(sdev, evt_type, GFP_KERNEL);

Hmm ... the original code iterates over the range 1 .. SDEV_EVT_LAST
while the new code iterates over the range 0 .. SDEV_EVT_LAST - 1. 
Please fix this.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ