lkml.org 
[lkml]   [2015]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant
On Sat, Oct 31, 2015 at 03:15:12PM +0200, Noam Camus wrote:
> From: Noam Camus <noamc@ezchip.com>
>
> If we hold rw->lock_mutex and interrupt occures we may
> end up spinning on it for ever during softirq.
>
> Below you may see an example for interrupt we get while
> nl_table_lock is holding its rw->lock_mutex and we spinned
> on it for ever.
>
> The concept for the fix was taken from SPARC.
>
> [2015-05-12 19:16:12] Stack Trace:
> [2015-05-12 19:16:12] arc_unwind_core+0xb8/0x11c
> [2015-05-12 19:16:12] dump_stack+0x68/0xac
> [2015-05-12 19:16:12] _raw_read_lock+0xa8/0xac
> [2015-05-12 19:16:12] netlink_broadcast_filtered+0x56/0x35c
> [2015-05-12 19:16:12] nlmsg_notify+0x42/0xa4
> [2015-05-12 19:16:13] neigh_update+0x1fe/0x44c
> [2015-05-12 19:16:13] neigh_event_ns+0x40/0xa4
> [2015-05-12 19:16:13] arp_process+0x46e/0x5a8
> [2015-05-12 19:16:13] __netif_receive_skb_core+0x358/0x500
> [2015-05-12 19:16:13] process_backlog+0x92/0x154
> [2015-05-12 19:16:13] net_rx_action+0xb8/0x188
> [2015-05-12 19:16:13] __do_softirq+0xda/0x1d8
> [2015-05-12 19:16:14] irq_exit+0x8a/0x8c
> [2015-05-12 19:16:14] arch_do_IRQ+0x6c/0xa8
> [2015-05-12 19:16:14] handle_interrupt_level1+0xe4/0xf0
>
> Signed-off-by: Noam Camus <noamc@ezchip.com>
> Cc: Peter Zijlstra <peterz@infradead.org>

It might make sense to note that this is a lock internal lock and since
the lock is free to be used from any context, the lock needs to be
IRQ-safe.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>



\
 
 \ /
  Last update: 2015-11-02 10:41    [W:0.371 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site