Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1313977
| Path | csiph.com!news.freedyn.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Hannes Reinecke <hare@suse.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] scsi: Fix RCU handling for VPD pages |
| Date | Thu, 21 Jan 2016 08:50:02 +0100 |
| Message-ID | <qTiae-24V-9@gated-at.bofh.it> (permalink) |
| References | <qTh4t-1mn-3@gated-at.bofh.it> <qTh4t-1mn-1@gated-at.bofh.it> |
| X-Original-To | Alexander Duyck <aduyck@mirantis.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 32 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | James Bottomley <James.Bottomley@HansenPartnership.com>, linux-scsi@vger.kernel.org, alexander.duyck@gmail.com, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, shane.seymour@hpe.com, jthumshirn@suse.de |
| X-Original-Date | Thu, 21 Jan 2016 08:40:17 +0100 |
| X-Original-Message-ID | <56A08B61.6070908@suse.de> |
| X-Original-References | <20160121063039.3803.66.stgit@localhost.localdomain> <20160121063528.3803.92532.stgit@localhost.localdomain> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1313977 |
Show key headers only | View raw
On 01/21/2016 07:35 AM, Alexander Duyck wrote:
> This patch is meant to fix the RCU handling for VPD pages. The original
> code had a number of issues including the fact that the local variables
> were being declared as __rcu, the RCU variable being directly accessed
> outside of the RCU locked region, and the fact that length was not
> associated with the data so it would be possible to get a mix and match of
> the length for one VPD page with the data from another.
>
> Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes")
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
> ---
> drivers/scsi/scsi.c | 52 +++++++++++++++++++++++---------------------
> drivers/scsi/scsi_lib.c | 12 +++++-----
> drivers/scsi/scsi_sysfs.c | 14 +++++++-----
> include/scsi/scsi_device.h | 14 ++++++++----
> 4 files changed, 50 insertions(+), 42 deletions(-)
>
Thanks for fixing this up. I didn't really like the two distinct
variables for vpd buffer and length, too, but hadn't thought of
using a struct for here.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] scsi: Fix RCU handling for VPD pages Alexander Duyck <aduyck@mirantis.com> - 2016-01-21 07:40 +0100 Re: [PATCH 2/2] scsi: Fix RCU handling for VPD pages Hannes Reinecke <hare@suse.de> - 2016-01-21 08:50 +0100
csiph-web