All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Changhui Zhong <czhong@redhat.com>,
	Yi Zhang <yi.zhang@redhat.com>, Ming Lei <ming.lei@redhat.com>
Subject: [PATCH 0/2] SCSI: fix race between releasing shost and unloading LLD module
Date: Thu, 30 Sep 2021 13:20:26 +0800	[thread overview]
Message-ID: <20210930052028.934747-1-ming.lei@redhat.com> (raw)

Hello,

Patch 1 allows put_device() to return if the device is really released.

Patch 2 fixes one race between releasing shost and unloading LLD module
by making sure that LLD module refcnt is dropped after the scsi device
is released.

Fix the kernel panic of 'BUG: unable to handle page fault for address'
reported by Changhui and Yi.


Ming Lei (2):
  driver core: tell caller if the device/kboject is really released
  scsi: core: put LLD module refcnt after SCSI device is released

 drivers/base/core.c        |  5 +++--
 drivers/scsi/scsi.c        | 14 ++++++++++++--
 drivers/scsi/scsi_sysfs.c  |  8 ++++++++
 include/linux/device.h     |  2 +-
 include/linux/kobject.h    |  2 +-
 include/scsi/scsi_device.h |  1 +
 lib/kobject.c              |  5 +++--
 7 files changed, 29 insertions(+), 8 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-09-30  5:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  5:20 Ming Lei [this message]
2021-09-30  5:20 ` [PATCH 1/2] driver core: tell caller if the device/kboject is really released Ming Lei
2021-09-30  5:51   ` Greg Kroah-Hartman
2021-09-30  7:22     ` Ming Lei
2021-09-30  5:20 ` [PATCH 2/2] scsi: core: put LLD module refcnt after SCSI device is released Ming Lei
2021-09-30  5:57   ` Greg Kroah-Hartman

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=20210930052028.934747-1-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=czhong@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yi.zhang@redhat.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.