public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Rework handling of scsi_device.vpd_pg8[03]
@ 2017-08-28 20:46 Bart Van Assche
  2017-08-28 20:46 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Bart Van Assche @ 2017-08-28 20:46 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Paul E . McKenney, Ingo Molnar, Christoph Hellwig,
	Bart Van Assche

Hello Martin,

The conclusion of a recent discussion about the handling of SCSI device VPD
data is that the code should be reworked such that that data is freed through
kfree_rcu() instead of kfree(). The three patches in this series realize this
and also simplify the VPD code. Please consider these patches for kernel
v4.14.

Thanks,

Bart.

Changes between v2 and v3:
- Added a third patch that introduces rcu_swap_protected().
- Introduced scsi_update_vpd_page().
- Skip VPD buffer updating if querying VPD data fails.
- Fix a race condition in the VPD sysfs show method.

Changes between v1 and v2:
- Split the VPD rework into two patches.
- Introduced struct scsi_vpd and scsi_get_vpd_buf().

Bart Van Assche (3):
  Rework the code for caching Vital Product Data (VPD)
  Rework handling of scsi_device.vpd_pg8[03]
  scsi_transport_sas: Fix error handling in sas_smp_request()

 drivers/scsi/scsi.c               | 140 ++++++++++++++++----------------------
 drivers/scsi/scsi_lib.c           |  16 ++---
 drivers/scsi/scsi_sysfs.c         |  29 +++++---
 drivers/scsi/scsi_transport_sas.c |   6 +-
 include/scsi/scsi_device.h        |  18 +++--
 5 files changed, 106 insertions(+), 103 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v3 0/3] Rework handling of scsi_device.vpd_pg8[03]
@ 2017-08-28 20:45 Bart Van Assche
  2017-08-28 20:45 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
  2017-08-28 20:45 ` Bart Van Assche
  0 siblings, 2 replies; 11+ messages in thread
From: Bart Van Assche @ 2017-08-28 20:45 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Paul E . McKenney, Ingo Molnar, Christoph Hellwig,
	Bart Van Assche

Hello Martin,

The conclusion of a recent discussion about the handling of SCSI device VPD
data is that the code should be reworked such that that data is freed through
kfree_rcu() instead of kfree(). The three patches in this series realize this
and also simplify the VPD code. Please consider these patches for kernel
v4.14.

Thanks,

Bart.

Changes between v2 and v3:
- Added a third patch that introduces rcu_swap_protected().
- Introduced scsi_update_vpd_page().
- Skip VPD buffer updating if querying VPD data fails.
- Fix a race condition in the VPD sysfs show method.

Changes between v1 and v2:
- Split the VPD rework into two patches.
- Introduced struct scsi_vpd and scsi_get_vpd_buf().

Bart Van Assche (3):
  Rework the code for caching Vital Product Data (VPD)
  Rework handling of scsi_device.vpd_pg8[03]
  scsi_transport_sas: Fix error handling in sas_smp_request()

 drivers/scsi/scsi.c               | 140 ++++++++++++++++----------------------
 drivers/scsi/scsi_lib.c           |  16 ++---
 drivers/scsi/scsi_sysfs.c         |  29 +++++---
 drivers/scsi/scsi_transport_sas.c |   6 +-
 include/scsi/scsi_device.h        |  18 +++--
 5 files changed, 106 insertions(+), 103 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v3 0/3] Rework handling of scsi_device.vpd_pg8[03]
@ 2017-08-28 20:44 Bart Van Assche
  2017-08-28 20:44 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
  2017-08-28 20:44 ` Bart Van Assche
  0 siblings, 2 replies; 11+ messages in thread
From: Bart Van Assche @ 2017-08-28 20:44 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Paul E . McKenney, Ingo Molnar, Christoph Hellwig,
	Bart Van Assche

Hello Martin,

The conclusion of a recent discussion about the handling of SCSI device VPD
data is that the code should be reworked such that that data is freed through
kfree_rcu() instead of kfree(). The three patches in this series realize this
and also simplify the VPD code. Please consider these patches for kernel
v4.14.

Thanks,

Bart.

Changes between v2 and v3:
- Added a third patch that introduces rcu_swap_protected().
- Introduced scsi_update_vpd_page().
- Skip VPD buffer updating if querying VPD data fails.
- Fix a race condition in the VPD sysfs show method.

Changes between v1 and v2:
- Split the VPD rework into two patches.
- Introduced struct scsi_vpd and scsi_get_vpd_buf().

Bart Van Assche (3):
  Rework the code for caching Vital Product Data (VPD)
  Rework handling of scsi_device.vpd_pg8[03]
  scsi_transport_sas: Fix error handling in sas_smp_request()

 drivers/scsi/scsi.c               | 140 ++++++++++++++++----------------------
 drivers/scsi/scsi_lib.c           |  16 ++---
 drivers/scsi/scsi_sysfs.c         |  29 +++++---
 drivers/scsi/scsi_transport_sas.c |   6 +-
 include/scsi/scsi_device.h        |  18 +++--
 5 files changed, 106 insertions(+), 103 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-08-28 21:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28 20:46 [PATCH v3 0/3] Rework handling of scsi_device.vpd_pg8[03] Bart Van Assche
2017-08-28 20:46 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
2017-08-28 21:26   ` Paul E. McKenney
2017-08-28 21:39     ` Bart Van Assche
2017-08-28 21:58       ` Paul E. McKenney
2017-08-28 20:46 ` [PATCH v3 2/3] Rework the code for caching Vital Product Data (VPD) Bart Van Assche
2017-08-28 20:46 ` [PATCH v3 3/3] Rework handling of scsi_device.vpd_pg8[03] Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2017-08-28 20:45 [PATCH v3 0/3] " Bart Van Assche
2017-08-28 20:45 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
2017-08-28 20:45 ` Bart Van Assche
2017-08-28 20:44 [PATCH v3 0/3] Rework handling of scsi_device.vpd_pg8[03] Bart Van Assche
2017-08-28 20:44 ` [PATCH v3 1/3] rcu: Introduce rcu_swap_protected() Bart Van Assche
2017-08-28 20:44 ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox