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 10:31:26 -0700 [thread overview]
Message-ID: <20180730173126.GH1206094@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <9761f00f237e50b40bd85c6889a297974cf9536d.camel@wdc.com>
Hello, Bart.
On Mon, Jul 30, 2018 at 05:28:11PM +0000, Bart Van Assche wrote:
> It's not clear to me how the sysfs_break_active_protection() should obtain
> the struct kernfs_node pointer to the attribute. Calling that function before
> device_remove_file_self() causes a double call to kernfs_break_active_protection(),
> which is wrong. Calling kernfs_find_and_get(kobj->sd, attr->name) after the
So, if you braek active protection explicitly, there's no need to call
remove_self(). It can just use regular remove.
> attribute has been removed results in a NULL pointer because the attribute that
> that call tries to look up has already been removed. Should I proceed with the
> approach proposed in the patches attached to a previous e-mail?
I don't have an objection for that.
Thanks.
--
tejun
next prev parent reply other threads:[~2018-07-30 19:07 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 [this message]
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
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=20180730173126.GH1206094@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