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>
This commit is contained in:

committed by
David S. Miller

parent
2a04cd4c7d
commit
d00c362f1b
@@ -235,6 +235,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
|
||||
|
||||
if ((s = rose_neigh_list) == rose_neigh) {
|
||||
rose_neigh_list = rose_neigh->next;
|
||||
if (rose_neigh->ax25)
|
||||
ax25_cb_put(rose_neigh->ax25);
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh);
|
||||
return;
|
||||
@@ -243,6 +245,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
|
||||
while (s != NULL && s->next != NULL) {
|
||||
if (s->next == rose_neigh) {
|
||||
s->next = rose_neigh->next;
|
||||
if (rose_neigh->ax25)
|
||||
ax25_cb_put(rose_neigh->ax25);
|
||||
kfree(rose_neigh->digipeat);
|
||||
kfree(rose_neigh);
|
||||
return;
|
||||
@@ -812,6 +816,7 @@ void rose_link_failed(ax25_cb *ax25, int reason)
|
||||
|
||||
if (rose_neigh != NULL) {
|
||||
rose_neigh->ax25 = NULL;
|
||||
ax25_cb_put(ax25);
|
||||
|
||||
rose_del_route_by_neigh(rose_neigh);
|
||||
rose_kill_by_neigh(rose_neigh);
|
||||
|
Reference in New Issue
Block a user