[AX25] ax25_route: make ax25_route_lock BH safe
authorJarek Poplawski <jarkao2@gmail.com>
Tue, 12 Feb 2008 05:26:43 +0000 (21:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Feb 2008 01:53:32 +0000 (17:53 -0800)
commit4de211f1a279275c6c67d6e9b6b25513e46b0bb9
treeb8e57f1000ed1d5ba0d93a8126a613ca6b3c7a7a
parent1105b5d1d44e6f00e31422dfcb0139bc8ae966a9
[AX25] ax25_route: make ax25_route_lock BH safe

> =================================
> [ INFO: inconsistent lock state ]
> 2.6.24-dg8ngn-p02 #1
> ---------------------------------
> inconsistent {softirq-on-W} -> {in-softirq-R} usage.
> linuxnet/3046 [HC0[0]:SC1[2]:HE1:SE0] takes:
>  (ax25_route_lock){--.+}, at: [<f8a0cfb7>] ax25_get_route+0x18/0xb7 [ax25]
> {softirq-on-W} state was registered at:
...

This lockdep report shows that ax25_route_lock is taken for reading in
softirq context, and for writing in process context with BHs enabled.
So, to make this safe, all write_locks in ax25_route.c are changed to
_bh versions.

Reported-by: Jann Traschewski <jann@gmx.de>,
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ax25/ax25_route.c