All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: John Garry <john.garry@huawei.com>
Cc: Tejun Heo <tj@kernel.org>,
	Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2] libsas: fix "sysfs group not found" warnings at port teardown time
Date: Fri, 24 Mar 2017 17:53:54 +0100	[thread overview]
Message-ID: <20170324165354.GJ3571@linux-x5ow.site> (raw)
In-Reply-To: <8415e37f-4d96-4b92-a967-cf41a4291e8f@huawei.com>

[ +Cc Tejun ]

On Fri, Mar 24, 2017 at 11:44:55AM +0000, John Garry wrote:
> To be clear, was this the same test with isci which you initially reported?

Yes, just echo into the PCI device's sysfs remove file and it'll trigger the
problem.

I did some archeology and it seems as if commit bcdde7e ("sysfs: make
__sysfs_remove_dir() recursive") introduced/uncovered this behavior.

For reference, here's one of my calltraces (the first of 40!):
------------[ cut here ]------------
WARNING: CPU: 2 PID: 5 at fs/sysfs/group.c:241 sysfs_remove_group+0xc3/0xd0
sysfs group 'power' not found for kobject 'end_device-6:0'
CPU: 16 PID: 5884 Comm: repro.sh Not tainted 4.11.0-rc3-libsas+ #504
Call Trace:
 dump_stack+0x85/0xc2
 __warn+0xc6/0xe0
 warn_slowpath_fmt+0x4a/0x50
 sysfs_remove_group+0xc3/0xd0
 dpm_sysfs_remove+0x52/0x60
 device_del+0x13c/0x360
 ? device_remove_file+0x14/0x20
 attribute_container_class_device_del+0x15/0x20
 transport_remove_classdev+0x4c/0x60
 ? transport_add_class_device+0x40/0x40
 attribute_container_device_trigger+0xb3/0xc0
 transport_remove_device+0x10/0x20
 sas_port_delete+0x12d/0x160 [scsi_transport_sas]
 sas_deform_port+0x1bf/0x1d0 [libsas]
 sas_unregister_ports+0x36/0x50 [libsas]
 sas_unregister_ha+0x1b/0x40 [libsas]
 isci_unregister+0x2a/0x40 [isci]
 isci_pci_remove+0x52/0xb0 [isci]
 ? __pm_runtime_resume+0x56/0x80
 pci_device_remove+0x34/0xb0
 device_release_driver_internal+0x158/0x210
 device_release_driver+0xd/0x10
 pci_stop_bus_device+0x85/0x90
 pci_stop_and_remove_bus_device_locked+0x15/0x30
 remove_store+0x59/0x70
 dev_attr_store+0x13/0x20
 sysfs_kf_write+0x40/0x50
 kernfs_fop_write+0x130/0x1b0
 __vfs_write+0x23/0x130
 ? rcu_read_lock_sched_held+0x6d/0x80
 ? rcu_sync_lockdep_assert+0x2a/0x50
 ? __sb_start_write+0xd7/0x1e0
 ? vfs_write+0x1a4/0x1f0
 vfs_write+0xc6/0x1f0
 SyS_write+0x44/0xa0
 entry_SYSCALL_64_fastpath+0x23/0xc6

But as I said, I don't belive this is a problem in the SAS transport or the
SAS drivers, but a device core or transport class.

Byte,
	Johannes
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  parent reply	other threads:[~2017-03-24 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 23:00 [PATCH v2] libsas: fix "sysfs group not found" warnings at port teardown time Dan Williams
2015-05-21  7:54 ` Luis Henriques
2015-05-21  7:54   ` Luis Henriques
2017-03-19 12:44 ` Johannes Thumshirn
2017-03-19 12:44   ` Johannes Thumshirn
     [not found]   ` <b98e90a0-4914-0277-4aca-03a897b59ac0@huawei.com>
     [not found]     ` <20170321135154.GF30013@linux-x5ow.site>
     [not found]       ` <5f350965-017b-fd5b-8fad-eba01682d72e@huawei.com>
     [not found]         ` <20170324112347.GE3571@linux-x5ow.site>
     [not found]           ` <8415e37f-4d96-4b92-a967-cf41a4291e8f@huawei.com>
2017-03-24 16:53             ` Johannes Thumshirn [this message]
2017-03-28 21:41               ` Tejun Heo
2017-03-29  8:11                 ` Johannes Thumshirn

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=20170324165354.GJ3571@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=john.garry@huawei.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tj@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 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.