diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2010-01-16 01:04:04 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-16 01:04:04 -0800 |
commit | d00c362f1b0ff54161e0a42b4554ac621a9ef92d (patch) | |
tree | 33ffeef90727309ad67690b2b7b63e1161b052ec /net/netrom/nr_route.c | |
parent | 2a04cd4c7d41c4549764734dcf5a883d304e3229 (diff) | |
download | kernel_samsung_smdk4412-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.zip kernel_samsung_smdk4412-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.tar.gz kernel_samsung_smdk4412-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.tar.bz2 |
ax25: netrom: rose: Fix timer oopses
Wrong ax25_cb refcounting in ax25_send_frame() and by its callers can
cause timer oopses (first reported with 2.6.29.6 kernel).
Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=14905
Reported-by: Bernard Pidoux <bpidoux@free.fr>
Tested-by: Bernard Pidoux <bpidoux@free.fr>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/nr_route.c')
-rw-r--r-- | net/netrom/nr_route.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index aacba76..e2e2d33 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -843,12 +843,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) dptr = skb_push(skb, 1); *dptr = AX25_P_NETROM; - ax25s = ax25_send_frame(skb, 256, (ax25_address *)dev->dev_addr, &nr_neigh->callsign, nr_neigh->digipeat, nr_neigh->dev); - if (nr_neigh->ax25 && ax25s) { - /* We were already holding this ax25_cb */ + ax25s = nr_neigh->ax25; + nr_neigh->ax25 = ax25_send_frame(skb, 256, + (ax25_address *)dev->dev_addr, + &nr_neigh->callsign, + nr_neigh->digipeat, nr_neigh->dev); + if (ax25s) ax25_cb_put(ax25s); - } - nr_neigh->ax25 = ax25s; dev_put(dev); ret = (nr_neigh->ax25 != NULL); |