summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@gmail.com>2010-01-16 01:04:04 -0800
committerDavid S. Miller <davem@davemloft.net>2010-01-16 01:04:04 -0800
commitd00c362f1b0ff54161e0a42b4554ac621a9ef92d (patch)
tree33ffeef90727309ad67690b2b7b63e1161b052ec /include
parent2a04cd4c7d41c4549764734dcf5a883d304e3229 (diff)
downloadlinux-3.10-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.tar.gz
linux-3.10-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.tar.bz2
linux-3.10-d00c362f1b0ff54161e0a42b4554ac621a9ef92d.zip
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 'include')
-rw-r--r--include/net/netrom.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netrom.h b/include/net/netrom.h
index 15696b1fd30..ab170a60e7d 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -132,6 +132,8 @@ static __inline__ void nr_node_put(struct nr_node *nr_node)
static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
{
if (atomic_dec_and_test(&nr_neigh->refcount)) {
+ if (nr_neigh->ax25)
+ ax25_cb_put(nr_neigh->ax25);
kfree(nr_neigh->digipeat);
kfree(nr_neigh);
}