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]
Message-ID: <1484841924.2634.1.camel@sandisk.com>
Date:   Thu, 19 Jan 2017 16:05:38 +0000
From:   Bart Van Assche <Bart.VanAssche@...disk.com>
To:     "chaitra.basappa@...adcom.com" <chaitra.basappa@...adcom.com>,
        "JBottomley@...allels.com" <JBottomley@...allels.com>,
        "jejb@...nel.org" <jejb@...nel.org>,
        "hch@...radead.org" <hch@...radead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Sathya.Prakash@...adcom.com" <Sathya.Prakash@...adcom.com>,
        "suganath-prabu.subramani@...adcom.com" 
        <suganath-prabu.subramani@...adcom.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "krishnaraddi.mankani@...adcom.com" 
        <krishnaraddi.mankani@...adcom.com>,
        "kashyap.desai@...adcom.com" <kashyap.desai@...adcom.com>,
        "sreekanth.reddy@...adcom.com" <sreekanth.reddy@...adcom.com>
Subject: Re: [PATCH 2/4] mpt3sas: Fix for Crusader to achieve product
 targets with SAS devices.

On Thu, 2017-01-19 at 21:19 +0530, Chaitra P B wrote:
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 5ffbfb1..b3f9f7a 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -1096,6 +1096,27 @@ _scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc, u16 smid)
>  }
>  
>  /**
> + * _scsih_scsi_lookup_get_clear_without_lock - returns scmd entry without
> + *						holding any lock.
> + * @ioc: per adapter object
> + * @smid: system request message index
> + *
> + * Returns the smid stored scmd pointer.
> + * Then will derefrence the stored scmd pointer.
> + */
> +static inline struct scsi_cmnd *
> +_scsih_scsi_lookup_get_clear_without_lock(struct MPT3SAS_ADAPTER *ioc,
> +		u16 smid)
> +{
> +	struct scsi_cmnd *scmd;
> +
> +	scmd = ioc->scsi_lookup[smid - 1].scmd;
> +	ioc->scsi_lookup[smid - 1].scmd = NULL;
> +
> +	return scmd;
> +}

Please make the following changes in the above code:
* Use swap() instead of open-coding it.
* Call _scsih_scsi_lookup_get_clear_without_lock() from
  _scsih_scsi_lookup_get_clear() to avoid code duplication.
* Fix the spelling of "dereference".

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ