RE: proc_subdir_lock related deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Steven
   Thanks for your reply!
   I'm using kernel3.4. The function uid_stat_tcp_rcv() was added by below patch:
   Yes, this file was removed in kernel3.8. So to avoid this happen, we should always avoid this lock used in softirq context in future right?
   And for kernel3.4, what's your opinion to do this fix?

commit 5a0b3548945769cf631a21e769f14a9ba8ae1c99
Author: Mike Chan <mike@xxxxxxxxxxx>
Date:   Wed Jan 7 11:40:42 2009 -0800

    misc: uidstat: Adding uid stat driver to collect network statistics.
    
    Signed-off-by: Mike Chan <mike@xxxxxxxxxxx>


Thanks!

Best Regards
Lisa Du


-----Original Message-----
From: Steven Rostedt [mailto:rostedt@xxxxxxxxxxx] 
Sent: 2013年5月22日 1:39
To: Lisa Du
Cc: linux-fsdevel@xxxxxxxxxxxxxxx; Ingo Molnar
Subject: Re: proc_subdir_lock related deadlock

On Sun, 2013-05-19 at 22:12 -0700, Lisa Du wrote:
> Dear Sir
>    Recently I met a deadlock case which is caused by proc_subdir_lock used in softirq context.
> So I searched the mailing list and find there’s already the discussion in 2006 as below:
> http://lkml.indiana.edu/hypermail/linux/kernel/0601.3/0437.html
>    And I also checked the mainline, seems no direct fix patch for this potential issue.
> So I want to know if there’s any concern that mainline didn’t accept the patch? 

I believe the real fix is not to call remove or create proc from softirq
context.

What kernel are you using, as I can't find uid_stat_tcp_rcv() anywhere
in the latest kernel.

-- Steve

>    Looking forward to your reply and thanks in advance!
> 
> BTW: below are the soft lockup panic stack I have got:
>  #0 [<c0181b98>] (crash_update) from [<c0135980>]
>  #1 [<c0135980>] (panic_flush) from [<c015b454>]
>  #2 [<c015b454>] (notifier_call_chain) from [<c015b618>]
>  #3 [<c015b618>] (__atomic_notifier_call_chain) from [<c015b63c>]
>  #4 [<c015b63c>] (atomic_notifier_call_chain) from [<c05c323c>]
>  #5 [<c05c323c>] (panic) from [<c0183278>]
>  #6 [<c0183278>] (watchdog_timer_fn) from [<c01598c8>]
>  #7 [<c01598c8>] (__run_hrtimer) from [<c015a4fc>]
>  #8 [<c015a4fc>] (hrtimer_interrupt) from [<c01183c0>]
>  #9 [<c01183c0>] (twd_handler) from [<c0186c60>]
> #10 [<c0186c60>] (handle_percpu_devid_irq) from [<c0183894>]
> #11 [<c0183894>] (generic_handle_irq) from [<c0113c9c>]
> #12 [<c0113c9c>] (handle_IRQ) from [<c01084ac>]
> #13 [<c01084ac>] (gic_handle_irq) from [<c0112980>]
>     pc : [<c05c9e90>]    lr : [<c05c9e68>]    psr: 20000113
>     sp : dc831780  ip : 00000000  fp : 000003d8
>     r10: c4180ad0  r9 : c05757dc  r8 : dc831828
>     r7 : 00000002  r6 : 00000001  r5 : dc830000  r4 : c08b7294
>     r3 : 00000001  r2 : dc831770  r1 : 00000000  r0 : 00000001
>     Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
> #14 [<c0112980>] (__irq_svc) from [<c05c9e68>]
> #15 [<c05c9e90>] (__raw_spin_lock) from [<c021ef7c>]
> #16 [<c021ef7c>] (__proc_create) from [<c021f1b8>]
> #17 [<c021f1b8>] (proc_mkdir_mode) from [<c034fcc4>]
> #18 [<c034fcc4>] (create_stat) from [<c034fdb4>]
> #19 [<c034fdb4>] (uid_stat_tcp_rcv) from [<c04bf498>]
> #20 [<c04bf498>] (tcp_read_sock) from [<c0575478>]
> #21 [<c0575478>] (xs_tcp_data_ready) from [<c04c7c48>]
> #22 [<c04c7c48>] (tcp_rcv_established) from [<c04cdba4>]
> #23 [<c04cdba4>] (tcp_v4_do_rcv) from [<c04cfb24>]
> #24 [<c04cfb24>] (tcp_v4_rcv) from [<c04b0ac8>]
> #25 [<c04b0ac8>] (ip_local_deliver_finish) from [<c04b0940>]
> #26 [<c04b0940>] (ip_rcv_finish) from [<c0479974>]
> #27 [<c0479974>] (__netif_receive_skb) from [<c0479b5c>]
> #28 [<c0479b5c>] (process_backlog) from [<c047ccc8>]
> #29 [<c047ccc8>] (net_rx_action) from [<c013f9b8>]
> #30 [<c013f9b8>] (__do_softirq) from [<c013ff00>]
> #31 [<c013ff00>] (irq_exit) from [<c0113ca0>]
> #32 [<c0113ca0>] (handle_IRQ) from [<c01084ac>]
> #33 [<c01084ac>] (gic_handle_irq) from [<c0112980>]
>     pc : [<c02e7294>]    lr : [<c021ee08>]    psr: 20000113
>     sp : dc831a48  ip : 005f7000  fp : 00000000
>     r10: c8145e74  r9 : 60000113  r8 : 60000113
>     r7 : d216c8d5  r6 : c8171180  r5 : c8170f00  r4 : d216c880
>     r3 : 00000073  r2 : 00000067  r1 : d216c8d6  r0 : c81711d6
>  Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
>  #34 [<c0112980>] (__irq_svc) from [<c021ee08>]
>  #35 [<c02e7294>] (strcmp) from [<c021ee08>]
>  #36 [<c021ee08>] (proc_register) from [<c021f1cc>]
>  #37 [<c021f1cc>] (proc_mkdir_mode) from [<c0188540>]
>  #38 [<c0188540>] (register_handler_proc) from [<c01853b8>]
>  #39 [<c01853b8>] (__setup_irq) from [<c0185530>]
>  #40 [<c0185530>] (request_threaded_irq) from [<bf000388>]
>  #41 [<bf000388>] (gckGALDEVICE_Setup_ISR [galcore]) from [<bf0334a0>]
>  #42 [<bf0334a0>] (gckHARDWARE_SetPowerManagementState [galcore]) from [<bf00f840>]
>  #43 [<bf00f840>] (gckOS_Broadcast [galcore]) from [<bf019988>]
>  #44 [<bf019988>] (gckCOMMAND_EnterCommit [galcore]) from [<bf01a52c>]
>  #45 [<bf01a52c>] (gckCOMMAND_Commit [galcore]) from [<bf017518>]
>  #46 [<bf017518>] (gckKERNEL_Dispatch [galcore]) from [<bf002190>]
>  #47 [<bf002190>] (drv_ioctl [galcore]) from [<c01e5c84>]
>  #48 [<c01e5c84>] (do_vfs_ioctl) from [<c01e5d2c>]
>  #49 [<c01e5d2c>] (sys_ioctl) from [<c0112d80>]
> 
> Thanks!
> 
> Best Regards
> Lisa Du
> 


��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux