From: "tj@kernel.org" <tj@kernel.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
"jthumshirn@suse.de" <jthumshirn@suse.de>,
"oleg@redhat.com" <oleg@redhat.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"ebiederm@xmission.com" <ebiederm@xmission.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"hare@suse.com" <hare@suse.com>,
"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>
Subject: Re: [PATCH, RESEND] Avoid that SCSI device removal through sysfs triggers a deadlock
Date: Mon, 30 Jul 2018 07:17:46 -0700 [thread overview]
Message-ID: <20180730141746.GD1206094@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <c313b5f09b6636fe71eb0a6c7390c3ef51869ae7.camel@wdc.com>
On Sun, Jul 29, 2018 at 04:03:41AM +0000, Bart Van Assche wrote:
> On Thu, 2018-07-26 at 06:35 -0700, Tejun Heo wrote:
> > Making removal asynchronous this way sometimes causes issues because
> > whether the user sees the device released or not is racy.
>
> Hello Tejun,
>
> How could this change cause any user-visible changes? My understanding is
> that any work queued with task_work_add() is executed before system call
> execution leaves kernel context and returns back to user space context.
Ah, you're right. This isn't workqueue. Hmm... yeah, needing to
allocate sth in removal path is a bit icky but, it should be okay I
guess. I *think* the kernfs active break/unbreak is likely gonna be
cleaner tho.
Thanks.
--
tejun
prev parent reply other threads:[~2018-07-30 15:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 17:38 [PATCH, RESEND] Avoid that SCSI device removal through sysfs triggers a deadlock Bart Van Assche
2018-07-26 1:47 ` Martin K. Petersen
2018-07-26 11:46 ` Johannes Thumshirn
2018-07-26 12:50 ` Jack Wang
2018-07-26 13:35 ` Tejun Heo
2018-07-26 14:09 ` Bart Van Assche
2018-07-26 14:14 ` tj
2018-07-26 21:57 ` Bart Van Assche
2018-07-30 14:13 ` tj
2018-07-30 17:28 ` Bart Van Assche
2018-07-30 17:31 ` tj
2018-07-30 17:50 ` Bart Van Assche
2018-07-30 17:57 ` tj
2018-07-29 4:03 ` Bart Van Assche
2018-07-30 14:17 ` tj [this message]
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=20180730141746.GD1206094@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=Bart.VanAssche@wdc.com \
--cc=ebiederm@xmission.com \
--cc=hare@suse.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox