diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2010-01-16 04:04:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-16 04:04:04 -0500 |
commit | d00c362f1b0ff54161e0a42b4554ac621a9ef92d (patch) | |
tree | 33ffeef90727309ad67690b2b7b63e1161b052ec /include/net/netrom.h | |
parent | 2a04cd4c7d41c4549764734dcf5a883d304e3229 (diff) |
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/net/netrom.h')
-rw-r--r-- | include/net/netrom.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netrom.h b/include/net/netrom.h index 15696b1fd30f..ab170a60e7d3 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) | |||
132 | static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) | 132 | static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) |
133 | { | 133 | { |
134 | if (atomic_dec_and_test(&nr_neigh->refcount)) { | 134 | if (atomic_dec_and_test(&nr_neigh->refcount)) { |
135 | if (nr_neigh->ax25) | ||
136 | ax25_cb_put(nr_neigh->ax25); | ||
135 | kfree(nr_neigh->digipeat); | 137 | kfree(nr_neigh->digipeat); |
136 | kfree(nr_neigh); | 138 | kfree(nr_neigh); |
137 | } | 139 | } |