]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit5fdf5e95d3af2b85605bd9414c5a63aba878f904
treeb8e57f1000ed1d5ba0d93a8126a613ca6b3c7a7a
parent166cda9536c1fb2e0a5446ec247a3d76d146d7cd
[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