linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ethan Zhao <ethan.zhao@oracle.com>
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: Tue, 1 Aug 2017 11:06:35 -0700	[thread overview]
Message-ID: <20170801180635.GA31628@kroah.com> (raw)
In-Reply-To: <1501574545-15691-1-git-send-email-ethan.zhao@oracle.com>

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.

thanks,

greg k-h

  reply	other threads:[~2017-08-01 18:06 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 [this message]
2017-08-01 23:49   ` Ethan Zhao

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=20170801180635.GA31628@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ethan.kernel@gmail.com \
    --cc=ethan.zhao@oracle.com \
    --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).