linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Synchronize user layer access with system PM ops and error handling
@ 2021-01-14  3:13 Can Guo
  2021-01-14  3:13 ` [PATCH v5 1/2] scsi: ufs: Fix a possible NULL pointer issue Can Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Can Guo @ 2021-01-14  3:13 UTC (permalink / raw)
  To: asutoshd, nguyenb, hongwus, rnayak, linux-scsi, kernel-team,
	saravanak, salyzyn, cang

This series contains two changes and it is based on 5.11/scsi-queue
The 1st change is just a minor fix.
The 2nd change is to synchronize user layer access through UFS sysfs nodes, so that system PM ops (suspend, resume and shutdown), error handling and async probe won't be disturbed by user layer access. The protection is only added to some sysfs nodes, not all of them.

Change since v4:
- Incoroporate Adrian's comment - renamed ufshcd_is_sysfs_allowed() as ufshcd_is_user_access_allowed()

Change since v3:
- Rebased to 5.12/scsi-queue

Change since v2:
- Updated the 1st change, added a global boolean flag to tell if system suspend is invoked when hba is NULL, it is used during resume in case of hba becomes not NULL.

Change since v1:
- Slightly updated the 2nd change, added a dedicated inline func to check hba->shutting_down in ufshcd.h. This inline func can be updated to add more rules for sysfs passage in future.


Can Guo (2):
  scsi: ufs: Fix a possible NULL pointer issue
  scsi: ufs: Protect PM ops and err_handler from user access through
    sysfs

 drivers/scsi/ufs/ufs-sysfs.c | 106 ++++++++++++++++++++++++++++++++++++-------
 drivers/scsi/ufs/ufshcd.c    |  57 +++++++++++++++--------
 drivers/scsi/ufs/ufshcd.h    |  10 +++-
 3 files changed, 138 insertions(+), 35 deletions(-)

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


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

end of thread, other threads:[~2021-01-21  3:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  3:13 [PATCH v5 0/2] Synchronize user layer access with system PM ops and error handling Can Guo
2021-01-14  3:13 ` [PATCH v5 1/2] scsi: ufs: Fix a possible NULL pointer issue Can Guo
2021-01-14  3:13 ` [PATCH v5 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs Can Guo
2021-01-15  3:17 ` [PATCH v5 0/2] Synchronize user layer access with system PM ops and error handling Martin K. Petersen
2021-01-21  3:34 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).