Revision 6aa6caff30f5dcb9e55b03b9710c30b83750cae5 authored by Joe Lawrence on 22 May 2014, 21:30:54 UTC, committed by James Bottomley on 22 May 2014, 22:54:03 UTC
The recent change in sysfs, bcdde7e221a8750f9b62b6d0bd31b72ea4ad9309
"sysfs: make __sysfs_remove_dir() recursive" revealed an asymmetric
rphy device creation/deletion sequence in scsi_transport_sas:

  modprobe mpt2sas
    sas_rphy_add
      device_add A               rphy->dev
      device_add B               sas_device transport class
      device_add C               sas_end_device transport class
      device_add D               bsg class

  rmmod mpt2sas
    sas_rphy_delete
      sas_rphy_remove
        device_del B
        device_del C
        device_del A
          sysfs_remove_group     recursive sysfs dir removal
      sas_rphy_free
        device_del D             warning

  where device A is the parent of B, C, and D.

When sas_rphy_free tries to unregister the bsg request queue (device D
above), the ensuing sysfs cleanup discovers that its sysfs group has
already been removed and emits a warning, "sysfs group... not found for
kobject 'end_device-X:0'".

Since bsg creation is a side effect of sas_rphy_add, move its
complementary removal call into sas_rphy_remove. This imposes the
following tear-down order for the devices above: D, B, C, A.

Note the sas_device and sas_end_device transport class devices (B and C
above) are created and destroyed both via the list match traversal in
attribute_container_device_trigger, so the order in which they are
handled is fixed. This is fine as long as they are deleted before their
parent device.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent 0c8482a
History
File Mode Size
asymmetric_keys
async_tx
842.c -rw-r--r-- 4.6 KB
Kconfig -rw-r--r-- 40.0 KB
Makefile -rw-r--r-- 3.8 KB
ablk_helper.c -rw-r--r-- 4.2 KB
ablkcipher.c -rw-r--r-- 17.8 KB
aead.c -rw-r--r-- 14.0 KB
aes_generic.c -rw-r--r-- 61.9 KB
af_alg.c -rw-r--r-- 9.3 KB
ahash.c -rw-r--r-- 13.9 KB
algapi.c -rw-r--r-- 19.8 KB
algboss.c -rw-r--r-- 6.4 KB
algif_hash.c -rw-r--r-- 6.8 KB
algif_skcipher.c -rw-r--r-- 13.3 KB
ansi_cprng.c -rw-r--r-- 10.8 KB
anubis.c -rw-r--r-- 27.8 KB
api.c -rw-r--r-- 13.4 KB
arc4.c -rw-r--r-- 3.4 KB
authenc.c -rw-r--r-- 20.0 KB
authencesn.c -rw-r--r-- 23.1 KB
blkcipher.c -rw-r--r-- 19.9 KB
blowfish_common.c -rw-r--r-- 15.7 KB
blowfish_generic.c -rw-r--r-- 3.4 KB
camellia_generic.c -rw-r--r-- 34.9 KB
cast5_generic.c -rw-r--r-- 20.8 KB
cast6_generic.c -rw-r--r-- 9.5 KB
cast_common.c -rw-r--r-- 13.1 KB
cbc.c -rw-r--r-- 7.4 KB
ccm.c -rw-r--r-- 21.4 KB
chainiv.c -rw-r--r-- 8.5 KB
cipher.c -rw-r--r-- 3.3 KB
cmac.c -rw-r--r-- 7.5 KB
compress.c -rw-r--r-- 1.3 KB
crc32.c -rw-r--r-- 3.7 KB
crc32c_generic.c -rw-r--r-- 4.3 KB
crct10dif_common.c -rw-r--r-- 3.6 KB
crct10dif_generic.c -rw-r--r-- 3.2 KB
cryptd.c -rw-r--r-- 24.9 KB
crypto_null.c -rw-r--r-- 4.3 KB
crypto_user.c -rw-r--r-- 12.3 KB
crypto_wq.c -rw-r--r-- 972 bytes
ctr.c -rw-r--r-- 12.3 KB
cts.c -rw-r--r-- 9.8 KB
deflate.c -rw-r--r-- 5.4 KB
des_generic.c -rw-r--r-- 35.3 KB
ecb.c -rw-r--r-- 4.9 KB
eseqiv.c -rw-r--r-- 6.5 KB
fcrypt.c -rw-r--r-- 18.0 KB
fips.c -rw-r--r-- 705 bytes
gcm.c -rw-r--r-- 36.6 KB
gf128mul.c -rw-r--r-- 13.2 KB
ghash-generic.c -rw-r--r-- 3.7 KB
hash_info.c -rw-r--r-- 1.8 KB
hmac.c -rw-r--r-- 6.9 KB
internal.h -rw-r--r-- 4.1 KB
khazad.c -rw-r--r-- 51.8 KB
krng.c -rw-r--r-- 1.4 KB
lrw.c -rw-r--r-- 9.2 KB
lz4.c -rw-r--r-- 2.5 KB
lz4hc.c -rw-r--r-- 2.5 KB
lzo.c -rw-r--r-- 2.4 KB
md4.c -rw-r--r-- 6.2 KB
md5.c -rw-r--r-- 3.9 KB
memneq.c -rw-r--r-- 6.1 KB
michael_mic.c -rw-r--r-- 3.6 KB
pcbc.c -rw-r--r-- 7.7 KB
pcompress.c -rw-r--r-- 3.0 KB
pcrypt.c -rw-r--r-- 14.7 KB
proc.c -rw-r--r-- 3.7 KB
ripemd.h -rw-r--r-- 974 bytes
rmd128.c -rw-r--r-- 10.2 KB
rmd160.c -rw-r--r-- 12.6 KB
rmd256.c -rw-r--r-- 10.5 KB
rmd320.c -rw-r--r-- 13.1 KB
rng.c -rw-r--r-- 3.3 KB
salsa20_generic.c -rw-r--r-- 6.7 KB
scatterwalk.c -rw-r--r-- 3.3 KB
seed.c -rw-r--r-- 17.4 KB
seqiv.c -rw-r--r-- 8.5 KB
serpent_generic.c -rw-r--r-- 21.2 KB
sha1_generic.c -rw-r--r-- 3.5 KB
sha256_generic.c -rw-r--r-- 12.1 KB
sha512_generic.c -rw-r--r-- 8.7 KB
shash.c -rw-r--r-- 17.5 KB
tcrypt.c -rw-r--r-- 50.3 KB
tcrypt.h -rw-r--r-- 3.7 KB
tea.c -rw-r--r-- 6.6 KB
testmgr.c -rw-r--r-- 70.2 KB
testmgr.h -rw-r--r-- 971.0 KB
tgr192.c -rw-r--r-- 30.5 KB
twofish_common.c -rw-r--r-- 37.8 KB
twofish_generic.c -rw-r--r-- 6.2 KB
vmac.c -rw-r--r-- 18.9 KB
wp512.c -rw-r--r-- 59.7 KB
xcbc.c -rw-r--r-- 7.2 KB
xor.c -rw-r--r-- 4.0 KB
xts.c -rw-r--r-- 8.7 KB
zlib.c -rw-r--r-- 9.5 KB

back to top