From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernard Pidoux F6BVP Subject: [ROSE] [AX25] possible circular locking Date: Mon, 17 Dec 2007 11:06:04 +0100 Message-ID: <47664A0C.4060903@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit To: Jarek Poplawski , Alexey Dobriyan , Ralf Baechle DL5RB , Linux Netdev List Return-path: Received: from postfix2-g20.free.fr ([212.27.60.43]:37842 "EHLO postfix2-g20.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760758AbXLQKdN (ORCPT ); Mon, 17 Dec 2007 05:33:13 -0500 Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by postfix2-g20.free.fr (Postfix) with ESMTP id C0F9221457B8 for ; Mon, 17 Dec 2007 09:32:24 +0100 (CET) Sender: netdev-owner@vger.kernel.org List-ID: Hi, When I killall kissattach I can see the following message. This happens on kernel 2.6.24-rc5 already patched with the 6 previously patches I sent recently. ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.23.9 #1 ------------------------------------------------------- kissattach/2906 is trying to acquire lock: (linkfail_lock){-+..}, at: [] ax25_link_failed+0x11/0x39 [ax25] but task is already holding lock: (ax25_list_lock){-+..}, at: [] ax25_device_event+0x38/0x84 [ax25] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (ax25_list_lock){-+..}: [] __lock_acquire+0x9e9/0xbe6 [] ax25_find_cb+0x18/0xc6 [ax25] [] lock_acquire+0x6e/0x87 [] ax25_find_cb+0x18/0xc6 [ax25] [] _spin_lock_bh+0x2e/0x39 [] ax25_find_cb+0x18/0xc6 [ax25] [] ax25_find_cb+0x18/0xc6 [ax25] [] ax25_send_frame+0x40/0x131 [ax25] [] rose_send_frame+0x4a/0x5b [rose] [] rose_link_rx_restart+0x135/0x157 [rose] [] _spin_lock_bh+0x2e/0x39 [] rose_route_frame+0xad/0x4f3 [rose] [] dump_trace+0x81/0x8b [] save_trace+0x37/0x8c [] mark_lock+0x337/0x44b [] __lock_acquire+0xb9e/0xbe6 [] ax25_protocol_function+0x30/0x34 [ax25] [] ax25_protocol_function+0xd/0x34 [ax25] [] ax25_rx_iframe+0x2e3/0x332 [ax25] [] __mod_timer+0x89/0x93 [] ax25_std_frame_in+0x5b1/0x638 [ax25] [] ax25_kiss_rcv+0x3cd/0x712 [ax25] [] mark_held_locks+0x39/0x53 [] _spin_unlock_irqrestore+0x34/0x39 [] sock_queue_rcv_skb+0xd6/0xf3 [] _read_unlock+0x14/0x1c [] sock_queue_rcv_skb+0xd6/0xf3 [] netif_receive_skb+0x22d/0x289 [] trace_hardirqs_on+0x109/0x148 [] process_backlog+0x7b/0xeb [] net_rx_action+0x57/0xfd [] __do_softirq+0x40/0x90 [] do_softirq+0x27/0x3d [] do_IRQ+0x58/0x6c [] common_interrupt+0x2e/0x40 [] 0xffffffff -> #2 (rose_route_list_lock){-+..}: [] __lock_acquire+0x9e9/0xbe6 [] rose_route_frame+0x4d/0x4f3 [rose] [] lock_acquire+0x6e/0x87 [] rose_route_frame+0x4d/0x4f3 [rose] [] _spin_lock_bh+0x2e/0x39 [] rose_route_frame+0x4d/0x4f3 [rose] [] rose_route_frame+0x4d/0x4f3 [rose] [] dump_trace+0x81/0x8b [] save_trace+0x37/0x8c [] mark_lock+0x337/0x44b [] __lock_acquire+0xb9e/0xbe6 [] ax25_protocol_function+0x30/0x34 [ax25] [] ax25_protocol_function+0xd/0x34 [ax25] [] ax25_rx_iframe+0x2e3/0x332 [ax25] [] __mod_timer+0x89/0x93 [] ax25_std_frame_in+0x5b1/0x638 [ax25] [] ax25_kiss_rcv+0x3cd/0x712 [ax25] [] mark_held_locks+0x39/0x53 [] _spin_unlock_irqrestore+0x34/0x39 [] sock_queue_rcv_skb+0xd6/0xf3 [] _read_unlock+0x14/0x1c [] sock_queue_rcv_skb+0xd6/0xf3 [] netif_receive_skb+0x22d/0x289 [] trace_hardirqs_on+0x109/0x148 [] process_backlog+0x7b/0xeb [] net_rx_action+0x57/0xfd [] __do_softirq+0x40/0x90 [] do_softirq+0x27/0x3d [] do_IRQ+0x58/0x6c [] common_interrupt+0x2e/0x40 [] 0xffffffff -> #1 (rose_neigh_list_lock){-+..}: [] __lock_acquire+0x9e9/0xbe6 [] rose_link_failed+0xe/0x44 [rose] [] lock_acquire+0x6e/0x87 [] rose_link_failed+0xe/0x44 [rose] [] ax25_t1timer_expiry+0x0/0x20 [ax25] [] _spin_lock_bh+0x2e/0x39 [] rose_link_failed+0xe/0x44 [rose] [] rose_link_failed+0xe/0x44 [rose] [] ax25_link_failed+0x28/0x39 [ax25] [] ax25_disconnect+0x34/0xbe [ax25] [] run_timer_softirq+0xee/0x14a [] __do_softirq+0x31/0x90 [] trace_hardirqs_on+0x109/0x148 [] __do_softirq+0x40/0x90 [] do_softirq+0x27/0x3d [] do_IRQ+0x58/0x6c [] common_interrupt+0x2e/0x40 [] acpi_processor_idle+0x262/0x3cf [processor] [] cpu_idle+0x3c/0x51 [] start_kernel+0x272/0x277 [] unknown_bootoption+0x0/0x195 [] 0xffffffff -> #0 (linkfail_lock){-+..}: [] __lock_acquire+0x8d2/0xbe6 [] lock_acquire+0x6e/0x87 [] ax25_link_failed+0x11/0x39 [ax25] [] _spin_lock_bh+0x2e/0x39 [] ax25_link_failed+0x11/0x39 [ax25] [] ax25_link_failed+0x11/0x39 [ax25] [] ax25_disconnect+0x34/0xbe [ax25] [] ax25_device_event+0x53/0x84 [ax25] [] notifier_call_chain+0x2a/0x47 [] raw_notifier_call_chain+0x17/0x1a [] dev_close+0x62/0x66 [] unregister_netdevice+0xa6/0x21f [] unregister_netdev+0xf/0x15 [] mkiss_close+0x63/0x7c [mkiss] [] release_dev+0x4f1/0x5a6 [] __lock_acquire+0xb9e/0xbe6 [] _atomic_dec_and_lock+0x22/0x2c [] __lock_acquire+0xb9e/0xbe6 [] tty_release+0x7/0xa [] __fput+0xbc/0x172 [] filp_close+0x51/0x58 [] put_files_struct+0x5e/0xa6 [] do_exit+0x22e/0x6d9 [] _spin_unlock_irq+0x20/0x23 [] trace_hardirqs_on+0x11f/0x148 [] sys_exit_group+0x0/0xd [] get_signal_to_deliver+0x3c6/0x3ea [] do_notify_resume+0x81/0x5fe [] _spin_unlock_irqrestore+0x34/0x39 [] trace_hardirqs_on+0x11f/0x148 [] getnstimeofday+0x2b/0xac [] copy_to_user+0x2f/0x46 [] hrtimer_nanosleep+0x92/0xe5 [] hrtimer_wakeup+0x0/0x18 [] sys_nanosleep+0x49/0x59 [] work_notifysig+0x13/0x26 [] 0xffffffff other info that might help us debug this: 2 locks held by kissattach/2906: #0: (rtnl_mutex){--..}, at: [] unregister_netdev+0x8/0x15 #1: (ax25_list_lock){-+..}, at: [] ax25_device_event+0x38/0x84 [ax25] stack backtrace: [] print_circular_bug_tail+0x5e/0x66 [] __lock_acquire+0x8d2/0xbe6 [] lock_acquire+0x6e/0x87 [] ax25_link_failed+0x11/0x39 [ax25] [] _spin_lock_bh+0x2e/0x39 [] ax25_link_failed+0x11/0x39 [ax25] [] ax25_link_failed+0x11/0x39 [ax25] [] ax25_disconnect+0x34/0xbe [ax25] [] ax25_device_event+0x53/0x84 [ax25] [] notifier_call_chain+0x2a/0x47 [] raw_notifier_call_chain+0x17/0x1a [] dev_close+0x62/0x66 [] unregister_netdevice+0xa6/0x21f [] unregister_netdev+0xf/0x15 [] mkiss_close+0x63/0x7c [mkiss] [] release_dev+0x4f1/0x5a6 [] __lock_acquire+0xb9e/0xbe6 [] _atomic_dec_and_lock+0x22/0x2c [] __lock_acquire+0xb9e/0xbe6 [] tty_release+0x7/0xa [] __fput+0xbc/0x172 [] filp_close+0x51/0x58 [] put_files_struct+0x5e/0xa6 [] do_exit+0x22e/0x6d9 [] _spin_unlock_irq+0x20/0x23 [] trace_hardirqs_on+0x11f/0x148 [] sys_exit_group+0x0/0xd [] get_signal_to_deliver+0x3c6/0x3ea [] do_notify_resume+0x81/0x5fe [] _spin_unlock_irqrestore+0x34/0x39 [] trace_hardirqs_on+0x11f/0x148 [] getnstimeofday+0x2b/0xac [] copy_to_user+0x2f/0x46 [] hrtimer_nanosleep+0x92/0xe5 [] hrtimer_wakeup+0x0/0x18 [] sys_nanosleep+0x49/0x59 [] work_notifysig+0x13/0x26 ======================= Bernard Pidoux