Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313977

Re: [PATCH 2/2] scsi: Fix RCU handling for VPD pages

From Hannes Reinecke <hare@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] scsi: Fix RCU handling for VPD pages
Date 2016-01-21 08:50 +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>
Organization linux.* mail to news gateway

Show all headers | 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 | NextPrevious in thread | Find similar | Unroll thread


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