From: Ethan Zhao <ethan.zhao@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
ethan.kernel@gmail.com
Subject: Re: [PATCH] sysfs: replace WARN() with pr_debug in sysfs_remove_group()
Date: Wed, 2 Aug 2017 07:49:37 +0800 [thread overview]
Message-ID: <a5701c95-304a-e727-48eb-55ffeec04013@oracle.com> (raw)
In-Reply-To: <20170801180635.GA31628@kroah.com>
Grep,
On 2017/8/2 2:06, Greg KH wrote:
> On Tue, Aug 01, 2017 at 05:02:25PM +0900, Ethan Zhao wrote:
>> There is no enough error handling in block device adding/registration
>> path, for example,
>>
>> device_add_disk()
>> blk_register_queue()
>>
>> When kernel returns from device_add_disk(), no return value to tell
>> us it was successful or not --- that suggests it would always succeed,
>> and according to this assumption, then during block device removal/
>> unregistration steps,
>>
>> sd_remove()
>> del_gendisk()
>> blk_unregister_queue()
>>
>> dpm_sysfs_remove(), blk_trace_remove_sysfs() will be called blindly,
>> though there is likely no 'trace' 'power' sysfs groups there because
>> actually blk_register_queue()/device_add() failed somewhere. thus
>> causes WARN flood emitted from sysfs_remove_group() as following triggered
>> by unloading fnic driver:
> Then fix the real issue here, don't paper over the issue by changing the
> sysfs core please. No other subsystem seems to be having this issue.
Yep, I agree it is kind of cover up block layer issue.
Thanks,
Ethan
> thanks,
>
> greg k-h
>
prev parent reply other threads:[~2017-08-01 23:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 8:02 [PATCH] sysfs: replace WARN() with pr_debug in sysfs_remove_group() Ethan Zhao
2017-08-01 18:06 ` Greg KH
2017-08-01 23:49 ` Ethan Zhao [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=a5701c95-304a-e727-48eb-55ffeec04013@oracle.com \
--to=ethan.zhao@oracle.com \
--cc=ethan.kernel@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).