Hi,

 

We are using yaffs2 on a custom medical device for about a couple of years now without problems.

 

We want to implement a new feature consisting of upgrading the whole system with an usb stick holding the new rootfs. For that I created a ramdisk and from there we do the following (as explained in http://www.ronetix.at/wiki.davincidsp.com/Put_YAFFS_Image_to_Flash.html#Writing_a_Tarball_Image)

 

target$ flash_eraseall /dev/mtd3

target$ mount -t yaffs2 /dev/mtdblock3 /mnt

target$ cd /mnt

target$ tar xzf <imagedir>/rootfs.tar.gz

 

The rootfs is about 90Mb (I forgot, we are using a 3.0 kernel).

 

When untarring we get some deadlock problems. This is always reproducible, I mean we have not been able to do the untar and umount succesfully, either one or the other fails with a deadlock problem. I copy the traces below. The first problem is related with kswapd. I saw in the archives a similar report by Reed Lawson but it is from 2005 and relates to 2.x kernels. Of course there is no problem if we upgrade the rootfs from u-boot with nand write.yaffs.

 

We’d appreciate any insight on this.

 

Thanks.

 

 

/mnt/rootfs/rootfs.tmp # tar xf /mnt/ramdisk/rootfs.yaffs2.tar.gz

[  514.446044]

[  514.446075] =========================================================

[  514.454406] [ INFO: possible irq lock inversion dependency detected ]

[  514.461151] 3.0.101-BSP-dm37x-2.4-4 #7

[  514.465087] ---------------------------------------------------------

[  514.471862] kswapd0/23 just changed the state of lock:

[  514.477233]  (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.}, at: [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  514.487792] but this lock took another, RECLAIM_FS-unsafe lock in the past:

[  514.495086]  (mtd_table_mutex){+.+.+.}

[  514.498840]

[  514.498840] and interrupts could create inverse lock ordering between them.

[  514.498840]

[  514.509429]

[  514.509460] other info that might help us debug this:

[  514.516296]  Possible interrupt unsafe locking scenario:

[  514.516296]

[  514.523437]        CPU0                    CPU1

[  514.528198]        ----                    ----

[  514.532928]   lock(mtd_table_mutex);

[  514.536682]                                local_irq_disable();

[  514.542907]                                lock(&(yaffs_dev_to_lc(dev)->gross_lock));

[  514.551116]                                lock(mtd_table_mutex);

[  514.557525]   <Interrupt>

[  514.560272]     lock(&(yaffs_dev_to_lc(dev)->gross_lock));

[  514.566040]

[  514.566040]  *** DEADLOCK ***

[  514.566040]

[  514.572265] 2 locks held by kswapd0/23:

[  514.576293]  #0:  (shrinker_rwsem){++++..}, at: [<c0177c8c>] shrink_slab+0x2c/0x500

[  514.584350]  #1:  (iprune_sem){++++.-}, at: [<c01b71f4>] shrink_icache_memory+0x40/0x36c

[  514.592864]

[  514.592864] the shortest dependencies between 2nd lock and 1st lock:

[  514.601104]  -> (mtd_table_mutex){+.+.+.} ops: 13 {

[  514.606231]     HARDIRQ-ON-W at:

[  514.609619]                                          [<c0131200>] __lock_acquire+0x9f8/0x1b04

[  514.618591]                                          [<c0132938>] lock_acquire+0xa0/0x124

[  514.627197]                                          [<c05c6304>] mutex_lock_nested+0x74/0x300

[  514.636230]                                          [<c0380084>] register_mtd_user+0x1c/0x78

[  514.645202]                                          [<c002690c>] init_mtdchar+0xc0/0xec

[  514.653717]                                          [<c00b5360>] do_one_initcall+0x34/0x174

[  514.662597]                                          [<c0008b3c>] kernel_init+0xa4/0x13c

[  514.671081]                                          [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  514.679962]     SOFTIRQ-ON-W at:

[  514.683349]                                          [<c0131224>] __lock_acquire+0xa1c/0x1b04

[  514.692321]                                          [<c0132938>] lock_acquire+0xa0/0x124

[  514.700897]                                          [<c05c6304>] mutex_lock_nested+0x74/0x300

[  514.709960]                                          [<c0380084>] register_mtd_user+0x1c/0x78

[  514.718902]                                          [<c002690c>] init_mtdchar+0xc0/0xec

[  514.727416]                                          [<c00b5360>] do_one_initcall+0x34/0x174

[  514.736297]                                          [<c0008b3c>] kernel_init+0xa4/0x13c

[  514.744781]                                          [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  514.753662]     RECLAIM_FS-ON-W at:

[  514.757324]                                             [<c0133180>] mark_held_locks+0x4c/0x84

[  514.766357]                                             [<c013382c>] lockdep_trace_alloc+0x90/0xf4

[  514.775787]                                             [<c019bd8c>] kmem_cache_alloc_trace+0x30/0x15c

[  514.785552]                                             [<c02c8a48>] register_blkdev+0x78/0x164

[  514.794708]                                             [<c0385cb0>] register_mtd_blktrans+0x38/0x124

[  514.804382]                                             [<c00b5360>] do_one_initcall+0x34/0x174

[  514.813537]                                             [<c0008b3c>] kernel_init+0xa4/0x13c

[  514.822296]                                             [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  514.831451]     INITIAL USE at:

[  514.834747]                                         [<c0130b5c>] __lock_acquire+0x354/0x1b04

[  514.843597]                                         [<c0132938>] lock_acquire+0xa0/0x124

[  514.852111]                                         [<c05c6304>] mutex_lock_nested+0x74/0x300

[  514.861083]                                         [<c0380084>] register_mtd_user+0x1c/0x78

[  514.869934]                                         [<c002690c>] init_mtdchar+0xc0/0xec

[  514.878356]                                         [<c00b5360>] do_one_initcall+0x34/0x174

[  514.887115]                                         [<c0008b3c>] kernel_init+0xa4/0x13c

[  514.895538]                                         [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  514.904296]   }

[  514.906127]   ... key      at: [<c0971690>] mtd_table_mutex+0x40/0x58

[  514.912902]   ... acquired at:

[  514.916107]    [<c0132938>] lock_acquire+0xa0/0x124

[  514.921234]    [<c05c6304>] mutex_lock_nested+0x74/0x300

[  514.926818]    [<c0380140>] put_mtd_device+0x18/0x30

[  514.932037]    [<c0288210>] yaffs_put_super+0x9c/0x140

[  514.937438]    [<c01a0c38>] generic_shutdown_super+0x84/0x100

[  514.943450]    [<c01a0ccc>] kill_block_super+0x18/0x68

[  514.948852]    [<c01a12d4>] deactivate_locked_super+0x40/0x58

[  514.954895]    [<c01bb3cc>] sys_umount+0x6c/0x360

[  514.959838]    [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[  514.965148]

[  514.966705] -> (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.} ops: 90267 {

[  514.973846]    HARDIRQ-ON-W at:

[  514.977142]                                        [<c0131200>] __lock_acquire+0x9f8/0x1b04

[  514.985931]                                        [<c0132938>] lock_acquire+0xa0/0x124

[  514.994323]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[  515.003204]                                        [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  515.012512]                                        [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[  515.022949]                                        [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[  515.032897]                                        [<c01a1694>] mount_bdev+0x174/0x1a0

[  515.041229]                                        [<c0285f1c>] yaffs2_mount+0x18/0x20

[  515.049560]                                        [<c01a1e54>] mount_fs+0x44/0x18c

[  515.057586]                                        [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[  515.066101]                                        [<c01ba7bc>] do_kern_mount+0x34/0xd4

[  515.074493]                                        [<c01bbf18>] do_mount+0x2f0/0x718

[  515.082641]                                        [<c01bc618>] sys_mount+0x84/0xc4

[  515.090698]                                        [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[  515.099273]    SOFTIRQ-ON-W at:

[  515.102569]                                        [<c0131224>] __lock_acquire+0xa1c/0x1b04

[  515.111358]                                        [<c0132938>] lock_acquire+0xa0/0x124

[  515.119750]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[  515.128631]                                        [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  515.137939]                                        [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[  515.148376]                                        [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[  515.158325]                                        [<c01a1694>] mount_bdev+0x174/0x1a0

[  515.166656]                                        [<c0285f1c>] yaffs2_mount+0x18/0x20

[  515.174957]                                        [<c01a1e54>] mount_fs+0x44/0x18c

[  515.183013]                                        [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[  515.191528]                                        [<c01ba7bc>] do_kern_mount+0x34/0xd4

[  515.199920]                                        [<c01bbf18>] do_mount+0x2f0/0x718

[  515.208068]                                        [<c01bc618>] sys_mount+0x84/0xc4

[  515.216094]                                        [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[  515.224700]    IN-RECLAIM_FS-W at:

[  515.228271]                                           [<c01312d8>] __lock_acquire+0xad0/0x1b04

[  515.237335]                                           [<c0132938>] lock_acquire+0xa0/0x124

[  515.246002]                                           [<c05c6304>] mutex_lock_nested+0x74/0x300

[  515.255126]                                           [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  515.264739]                                           [<c0288310>] yaffs_evict_inode+0x5c/0x100

[  515.273864]                                           [<c01b6b48>] evict+0x70/0x170

[  515.281921]                                           [<c01b6c7c>] dispose_list+0x34/0x44

[  515.290527]                                           [<c01b7324>] shrink_icache_memory+0x170/0x36c

[  515.300018]                                           [<c0177df4>] shrink_slab+0x194/0x500

[  515.308715]                                           [<c017b370>] kswapd+0x9f4/0xe30

[  515.316925]                                           [<c011adfc>] kthread+0x84/0x88

[  515.325073]                                           [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  515.334045]    INITIAL USE at:

[  515.337249]                                       [<c0130b5c>] __lock_acquire+0x354/0x1b04

[  515.345916]                                       [<c0132938>] lock_acquire+0xa0/0x124

[  515.354248]                                       [<c05c6304>] mutex_lock_nested+0x74/0x300

[  515.363006]                                       [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  515.372253]                                       [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[  515.382568]                                       [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[  515.392456]                                       [<c01a1694>] mount_bdev+0x174/0x1a0

[  515.400665]                                       [<c0285f1c>] yaffs2_mount+0x18/0x20

[  515.408905]                                       [<c01a1e54>] mount_fs+0x44/0x18c

[  515.416870]                                       [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[  515.425262]                                       [<c01ba7bc>] do_kern_mount+0x34/0xd4

[  515.433593]                                       [<c01bbf18>] do_mount+0x2f0/0x718

[  515.441650]                                       [<c01bc618>] sys_mount+0x84/0xc4

[  515.449584]                                       [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[  515.458099]  }

[  515.459838]  ... key      at: [<c0f25f5c>] __key.25088+0x0/0x8

[  515.465972]  ... acquired at:

[  515.469085]    [<c012f850>] check_usage_forwards+0x138/0x14c

[  515.475036]    [<c01302f8>] mark_lock+0x1e4/0x6f4

[  515.479980]    [<c01312d8>] __lock_acquire+0xad0/0x1b04

[  515.485443]    [<c0132938>] lock_acquire+0xa0/0x124

[  515.490570]    [<c05c6304>] mutex_lock_nested+0x74/0x300

[  515.496154]    [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[  515.502197]    [<c0288310>] yaffs_evict_inode+0x5c/0x100

[  515.507781]    [<c01b6b48>] evict+0x70/0x170

[  515.512268]    [<c01b6c7c>] dispose_list+0x34/0x44

[  515.517303]    [<c01b7324>] shrink_icache_memory+0x170/0x36c

[  515.523223]    [<c0177df4>] shrink_slab+0x194/0x500

[  515.528350]    [<c017b370>] kswapd+0x9f4/0xe30

[  515.533020]    [<c011adfc>] kthread+0x84/0x88

[  515.537597]    [<c00c1e00>] kernel_thread_exit+0x0/0x8

[  515.542999]

[  515.544555]

[  515.544555] stack backtrace:

[  515.549133] [<c00c710c>] (unwind_backtrace+0x0/0x138) from [<c012f6d4>] (prin

[  515.560302] [<c012f6d4>] (print_irq_inversion_bug.part.34+0x1e4/0x228) from [

[  515.571990] [<c012f850>] (check_usage_forwards+0x138/0x14c) from [<c01302f8>]

[  515.581695] [<c01302f8>] (mark_lock+0x1e4/0x6f4) from [<c01312d8>] (__lock_ac

[  515.590911] [<c01312d8>] (__lock_acquire+0xad0/0x1b04) from [<c0132938>] (loc

[  515.600341] [<c0132938>] (lock_acquire+0xa0/0x124) from [<c05c6304>] (mutex_l

[  515.609832] [<c05c6304>] (mutex_lock_nested+0x74/0x300) from [<c0286744>] (ya

[  515.620269] [<c0286744>] (yaffs_gross_lock.isra.2+0x2c/0x78) from [<c0288310>

[  515.630676] [<c0288310>] (yaffs_evict_inode+0x5c/0x100) from [<c01b6b48>] (ev

[  515.639556] [<c01b6b48>] (evict+0x70/0x170) from [<c01b6c7c>] (dispose_list+0

[  515.647857] [<c01b6c7c>] (dispose_list+0x34/0x44) from [<c01b7324>] (shrink_i

[  515.657653] [<c01b7324>] (shrink_icache_memory+0x170/0x36c) from [<c0177df4>]

[  515.667510] [<c0177df4>] (shrink_slab+0x194/0x500) from [<c017b370>] (kswapd+

[  515.676116] [<c017b370>] (kswapd+0x9f4/0xe30) from [<c011adfc>] (kthread+0x84

[  515.684173] [<c011adfc>] (kthread+0x84/0x88) from [<c00c1e00>] (kernel_thread

/mnt/rootfs/rootfs.tmp #

 

 

 

/mnt/usb # tar xf rootfs.yaffs2.tar.gz -C /mnt/rootfs/

/mnt/usb # #Notice that tar ends ok.

/mnt/usb # umount /mnt/rootfs/

[ 1054.577423]

[ 1054.577453] ======================================================

[ 1054.585601] [ INFO: RECLAIM_FS-safe -> RECLAIM_FS-unsafe lock order detected ]

[ 1054.593231] 3.0.101-BSP-dm37x-2.4-4 #7

[ 1054.597198] ------------------------------------------------------

[ 1054.603759] umount/95 [HC0[0]:SC0[0]:HE1:SE1] is trying to acquire:

[ 1054.610412]  (mtd_table_mutex){+.+.+.}, at: [<c0380140>] put_mtd_device+0x18/0x30

[ 1054.618408]

[ 1054.618408] and this task is already holding:

[ 1054.624603]  (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.}, at: [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1054.635223] which would create a new lock dependency:

[ 1054.640594]  (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.} -> (mtd_table_mutex){+.+.+.}

[ 1054.649108]

[ 1054.649108] but this new dependency connects a RECLAIM_FS-irq-safe lock:

[ 1054.657775]  (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.}

[ 1054.663421] ... which became RECLAIM_FS-irq-safe at:

[ 1054.668853]   [<c01312d8>] __lock_acquire+0xad0/0x1b04

[ 1054.674346]   [<c0132938>] lock_acquire+0xa0/0x124

[ 1054.679443]   [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1054.684997]   [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1054.691009]   [<c0288310>] yaffs_evict_inode+0x5c/0x100

[ 1054.696563]   [<c01b6b48>] evict+0x70/0x170

[ 1054.701019]   [<c01b6c7c>] dispose_list+0x34/0x44

[ 1054.706024]   [<c01b7324>] shrink_icache_memory+0x170/0x36c

[ 1054.711944]   [<c0177df4>] shrink_slab+0x194/0x500

[ 1054.717041]   [<c017b994>] try_to_free_pages+0x1e8/0x3ec

[ 1054.722686]   [<c016f870>] __alloc_pages_nodemask+0x418/0x6a0

[ 1054.728790]   [<c0172370>] __do_page_cache_readahead+0x33c/0x718

[ 1054.735168]   [<c0172a00>] ra_submit+0x28/0x30

[ 1054.739898]   [<c016998c>] generic_file_aio_read+0x5ac/0x804

[ 1054.745910]   [<c019e8b8>] do_sync_read+0xa4/0xe4

[ 1054.750915]   [<c019f01c>] vfs_read+0xa4/0x134

[ 1054.755645]   [<c019f0ec>] sys_read+0x40/0x6c

[ 1054.760284]   [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1054.765563]

[ 1054.765563] to a RECLAIM_FS-irq-unsafe lock:

[ 1054.771667]  (mtd_table_mutex){+.+.+.}

[ 1054.775451] ... which became RECLAIM_FS-irq-unsafe at:

[ 1054.781097] ...  [<c0133180>] mark_held_locks+0x4c/0x84

[ 1054.786651]   [<c013382c>] lockdep_trace_alloc+0x90/0xf4

[ 1054.792297]   [<c019bd8c>] kmem_cache_alloc_trace+0x30/0x15c

[ 1054.798309]   [<c02c8a48>] register_blkdev+0x78/0x164

[ 1054.803710]   [<c0385cb0>] register_mtd_blktrans+0x38/0x124

[ 1054.809631]   [<c00b5360>] do_one_initcall+0x34/0x174

[ 1054.815002]   [<c0008b3c>] kernel_init+0xa4/0x13c

[ 1054.820007]   [<c00c1e00>] kernel_thread_exit+0x0/0x8

[ 1054.825378]

[ 1054.825378] other info that might help us debug this:

[ 1054.825408]

[ 1054.833862]  Possible interrupt unsafe locking scenario:

[ 1054.833892]

[ 1054.841064]        CPU0                    CPU1

[ 1054.845855]        ----                    ----

[ 1054.850646]   lock(mtd_table_mutex);

[ 1054.854461]                                local_irq_disable();

[ 1054.860717]                                lock(&(yaffs_dev_to_lc(dev)->gross_lock));

[ 1054.869049]                                lock(mtd_table_mutex);

[ 1054.875518]   <Interrupt>

[ 1054.878295]     lock(&(yaffs_dev_to_lc(dev)->gross_lock));

[ 1054.884124]

[ 1054.884124]  *** DEADLOCK ***

[ 1054.884124]

[ 1054.890411] 2 locks held by umount/95:

[ 1054.894378]  #0:  (&type->s_umount_key#19){++++..}, at: [<c01a17bc>] deactivate_super+0x50/0x60

[ 1054.903656]  #1:  (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.}, at: [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1054.914764]

[ 1054.914764] the dependencies between RECLAIM_FS-irq-safe lock and the holding lock:

[ 1054.924499] -> (&(yaffs_dev_to_lc(dev)->gross_lock)){+.+.-.} ops: 124451 {

[ 1054.931823]    HARDIRQ-ON-W at:

[ 1054.935180]                                        [<c0131200>] __lock_acquire+0x9f8/0x1b04

[ 1054.944030]                                        [<c0132938>] lock_acquire+0xa0/0x124

[ 1054.952545]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1054.961486]                                        [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1054.970916]                                        [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[ 1054.981445]                                        [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[ 1054.991485]                                        [<c01a1694>] mount_bdev+0x174/0x1a0

[ 1054.999908]                                        [<c0285f1c>] yaffs2_mount+0x18/0x20

[ 1055.008300]                                        [<c01a1e54>] mount_fs+0x44/0x18c

[ 1055.016448]                                        [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[ 1055.025024]                                        [<c01ba7bc>] do_kern_mount+0x34/0xd4

[ 1055.033538]                                        [<c01bbf18>] do_mount+0x2f0/0x718

[ 1055.041748]                                        [<c01bc618>] sys_mount+0x84/0xc4

[ 1055.049896]                                        [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.058563]    SOFTIRQ-ON-W at:

[ 1055.061889]                                        [<c0131224>] __lock_acquire+0xa1c/0x1b04

[ 1055.070770]                                        [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.079254]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.088226]                                        [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1055.097656]                                        [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[ 1055.108154]                                        [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[ 1055.118225]                                        [<c01a1694>] mount_bdev+0x174/0x1a0

[ 1055.126647]                                        [<c0285f1c>] yaffs2_mount+0x18/0x20

[ 1055.135040]                                        [<c01a1e54>] mount_fs+0x44/0x18c

[ 1055.143157]                                        [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[ 1055.151763]                                        [<c01ba7bc>] do_kern_mount+0x34/0xd4

[ 1055.160247]                                        [<c01bbf18>] do_mount+0x2f0/0x718

[ 1055.168457]                                        [<c01bc618>] sys_mount+0x84/0xc4

[ 1055.176605]                                        [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.185272]    IN-RECLAIM_FS-W at:

[ 1055.188903]                                           [<c01312d8>] __lock_acquire+0xad0/0x1b04

[ 1055.198028]                                           [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.206817]                                           [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.216033]                                           [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1055.225738]                                           [<c0288310>] yaffs_evict_inode+0x5c/0x100

[ 1055.234954]                                           [<c01b6b48>] evict+0x70/0x170

[ 1055.243103]                                           [<c01b6c7c>] dispose_list+0x34/0x44

[ 1055.251770]                                           [<c01b7324>] shrink_icache_memory+0x170/0x36c

[ 1055.261383]                                           [<c0177df4>] shrink_slab+0x194/0x500

[ 1055.270141]                                           [<c017b994>] try_to_free_pages+0x1e8/0x3ec

[ 1055.279479]                                           [<c016f870>] __alloc_pages_nodemask+0x418/0x6a0

[ 1055.289245]                                           [<c0172370>] __do_page_cache_readahead+0x33c/0x718

[ 1055.299316]                                           [<c0172a00>] ra_submit+0x28/0x30

[ 1055.307708]                                           [<c016998c>] generic_file_aio_read+0x5ac/0x804

[ 1055.317413]                                           [<c019e8b8>] do_sync_read+0xa4/0xe4

[ 1055.326080]                                           [<c019f01c>] vfs_read+0xa4/0x134

[ 1055.334472]                                           [<c019f0ec>] sys_read+0x40/0x6c

[ 1055.342803]                                           [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.351745]    INITIAL USE at:

[ 1055.354980]                                       [<c0130b5c>] __lock_acquire+0x354/0x1b04

[ 1055.363769]                                       [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.372161]                                       [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.381042]                                       [<c0286744>] yaffs_gross_lock.isra.2+0x2c/0x78

[ 1055.390350]                                       [<c028960c>] yaffs_internal_read_super.isra.10+0x888/0xda4

[ 1055.400787]                                       [<c0289b40>] yaffs2_internal_read_super_mtd+0x18/0x28

[ 1055.410766]                                       [<c01a1694>] mount_bdev+0x174/0x1a0

[ 1055.419067]                                       [<c0285f1c>] yaffs2_mount+0x18/0x20

[ 1055.427398]                                       [<c01a1e54>] mount_fs+0x44/0x18c

[ 1055.435424]                                       [<c01ba664>] vfs_kern_mount+0x4c/0x8c

[ 1055.443939]                                       [<c01ba7bc>] do_kern_mount+0x34/0xd4

[ 1055.452331]                                       [<c01bbf18>] do_mount+0x2f0/0x718

[ 1055.460449]                                       [<c01bc618>] sys_mount+0x84/0xc4

[ 1055.468505]                                       [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.477081]  }

[ 1055.478851]  ... key      at: [<c0f25f5c>] __key.25088+0x0/0x8

[ 1055.485046]  ... acquired at:

[ 1055.488189]    [<c012ffe4>] check_irq_usage+0x58/0xb4

[ 1055.493560]    [<c01316d8>] __lock_acquire+0xed0/0x1b04

[ 1055.499114]    [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.504302]    [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.509948]    [<c0380140>] put_mtd_device+0x18/0x30

[ 1055.515228]    [<c0288210>] yaffs_put_super+0x9c/0x140

[ 1055.520690]    [<c01a0c38>] generic_shutdown_super+0x84/0x100

[ 1055.526794]    [<c01a0ccc>] kill_block_super+0x18/0x68

[ 1055.532257]    [<c01a12d4>] deactivate_locked_super+0x40/0x58

[ 1055.538360]    [<c01bb3cc>] sys_umount+0x6c/0x360

[ 1055.543365]    [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.548736]

[ 1055.550323]

[ 1055.550323] the dependencies between the lock to be acquired and RECLAIM_FS-irq-unsafe lock:

[ 1055.560852] -> (mtd_table_mutex){+.+.+.} ops: 14 {

[ 1055.565979]    HARDIRQ-ON-W at:

[ 1055.569305]                                        [<c0131200>] __lock_acquire+0x9f8/0x1b04

[ 1055.578186]                                        [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.586669]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.595642]                                        [<c0380084>] register_mtd_user+0x1c/0x78

[ 1055.604492]                                        [<c002690c>] init_mtdchar+0xc0/0xec

[ 1055.612915]                                        [<c00b5360>] do_one_initcall+0x34/0x174

[ 1055.621704]                                        [<c0008b3c>] kernel_init+0xa4/0x13c

[ 1055.630096]                                        [<c00c1e00>] kernel_thread_exit+0x0/0x8

[ 1055.638854]    SOFTIRQ-ON-W at:

[ 1055.642211]                                        [<c0131224>] __lock_acquire+0xa1c/0x1b04

[ 1055.651062]                                        [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.659576]                                        [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.668518]                                        [<c0380084>] register_mtd_user+0x1c/0x78

[ 1055.677398]                                        [<c002690c>] init_mtdchar+0xc0/0xec

[ 1055.685791]                                        [<c00b5360>] do_one_initcall+0x34/0x174

[ 1055.694549]                                        [<c0008b3c>] kernel_init+0xa4/0x13c

[ 1055.702972]                                        [<c00c1e00>] kernel_thread_exit+0x0/0x8

[ 1055.711730]    RECLAIM_FS-ON-W at:

[ 1055.715362]                                           [<c0133180>] mark_held_locks+0x4c/0x84

[ 1055.724304]                                           [<c013382c>] lockdep_trace_alloc+0x90/0xf4

[ 1055.733642]                                           [<c019bd8c>] kmem_cache_alloc_trace+0x30/0x15c

[ 1055.743316]                                           [<c02c8a48>] register_blkdev+0x78/0x164

[ 1055.752380]                                           [<c0385cb0>] register_mtd_blktrans+0x38/0x124

[ 1055.761993]                                           [<c00b5360>] do_one_initcall+0x34/0x174

[ 1055.771026]                                           [<c0008b3c>] kernel_init+0xa4/0x13c

[ 1055.779693]                                           [<c00c1e00>] kernel_thread_exit+0x0/0x8

[ 1055.788757]    INITIAL USE at:

[ 1055.791992]                                       [<c0130b5c>] __lock_acquire+0x354/0x1b04

[ 1055.800781]                                       [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.809173]                                       [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.818054]                                       [<c0380084>] register_mtd_user+0x1c/0x78

[ 1055.826812]                                       [<c002690c>] init_mtdchar+0xc0/0xec

[ 1055.835144]                                       [<c00b5360>] do_one_initcall+0x34/0x174

[ 1055.843811]                                       [<c0008b3c>] kernel_init+0xa4/0x13c

[ 1055.852111]                                       [<c00c1e00>] kernel_thread_exit+0x0/0x8

[ 1055.860809]  }

[ 1055.862579]  ... key      at: [<c0971690>] mtd_table_mutex+0x40/0x58

[ 1055.869323]  ... acquired at:

[ 1055.872467]    [<c012ffe4>] check_irq_usage+0x58/0xb4

[ 1055.877838]    [<c01316d8>] __lock_acquire+0xed0/0x1b04

[ 1055.883392]    [<c0132938>] lock_acquire+0xa0/0x124

[ 1055.888580]    [<c05c6304>] mutex_lock_nested+0x74/0x300

[ 1055.894226]    [<c0380140>] put_mtd_device+0x18/0x30

[ 1055.899505]    [<c0288210>] yaffs_put_super+0x9c/0x140

[ 1055.904968]    [<c01a0c38>] generic_shutdown_super+0x84/0x100

[ 1055.911071]    [<c01a0ccc>] kill_block_super+0x18/0x68

[ 1055.916534]    [<c01a12d4>] deactivate_locked_super+0x40/0x58

[ 1055.922637]    [<c01bb3cc>] sys_umount+0x6c/0x360

[ 1055.927642]    [<c00c0f00>] ret_fast_syscall+0x0/0x3c

[ 1055.933013]

[ 1055.934600]

[ 1055.934600] stack backtrace:

[ 1055.939239] [<c00c710c>] (unwind_backtrace+0x0/0x138) from [<c012fe30>] (check_usage+0x47c/0x5d8)

[ 1055.948669] [<c012fe30>] (check_usage+0x47c/0x5d8) from [<c012ffe4>] (check_irq_usage+0x58/0xb4)

[ 1055.958007] [<c012ffe4>] (check_irq_usage+0x58/0xb4) from [<c01316d8>] (__lock_acquire+0xed0/0x1b04)

[ 1055.967712] [<c01316d8>] (__lock_acquire+0xed0/0x1b04) from [<c0132938>] (lock_acquire+0xa0/0x124)

[ 1055.977233] [<c0132938>] (lock_acquire+0xa0/0x124) from [<c05c6304>] (mutex_lock_nested+0x74/0x300)

[ 1055.986816] [<c05c6304>] (mutex_lock_nested+0x74/0x300) from [<c0380140>] (put_mtd_device+0x18/0x30)

[ 1055.996520] [<c0380140>] (put_mtd_device+0x18/0x30) from [<c0288210>] (yaffs_put_super+0x9c/0x140)

[ 1056.006042] [<c0288210>] (yaffs_put_super+0x9c/0x140) from [<c01a0c38>] (generic_shutdown_super+0x84/0x100)

[ 1056.016387] [<c01a0c38>] (generic_shutdown_super+0x84/0x100) from [<c01a0ccc>] (kill_block_super+0x18/0x68)

[ 1056.026733] [<c01a0ccc>] (kill_block_super+0x18/0x68) from [<c01a12d4>] (deactivate_locked_super+0x40/0x58)

[ 1056.037048] [<c01a12d4>] (deactivate_locked_super+0x40/0x58) from [<c01bb3cc>] (sys_umount+0x6c/0x360)

[ 1056.046936] [<c01bb3cc>] (sys_umount+0x6c/0x360) from [<c00c0f00>] (ret_fast_syscall+0x0/0x3c)