All of lore.kernel.org
 help / color / mirror / Atom feed
From: Can Guo <cang@codeaurora.org>
To: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
	hongwus@codeaurora.org, rnayak@codeaurora.org,
	linux-scsi@vger.kernel.org, kernel-team@android.com,
	saravanak@google.com, salyzyn@google.com, cang@codeaurora.org
Subject: [PATCH v4 0/2] Synchronize user layer access with system PM ops and error handling
Date: Wed, 13 Jan 2021 05:57:07 -0800	[thread overview]
Message-ID: <1610546230-14732-1-git-send-email-cang@codeaurora.org> (raw)

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 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.


             reply	other threads:[~2021-01-13 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:57 Can Guo [this message]
2021-01-13 13:57 ` [PATCH v4 1/2] scsi: ufs: Fix a possible NULL pointer issue Can Guo
2021-01-13 13:57   ` Can Guo
2021-01-13 13:57   ` Can Guo
2021-01-13 13:57 ` [PATCH v4 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs Can Guo
2021-01-13 13:57   ` Can Guo
2021-01-13 13:57   ` Can Guo
2021-01-13 14:53   ` Adrian Hunter
2021-01-13 14:53     ` Adrian Hunter
2021-01-13 14:53     ` Adrian Hunter
2021-01-14  0:48     ` Can Guo
2021-01-14  0:48       ` Can Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1610546230-14732-1-git-send-email-cang@codeaurora.org \
    --to=cang@codeaurora.org \
    --cc=asutoshd@codeaurora.org \
    --cc=hongwus@codeaurora.org \
    --cc=kernel-team@android.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nguyenb@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=salyzyn@google.com \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.