]> git.baikalelectronics.ru Git - kernel.git/commit
wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Fri, 13 Feb 2009 01:00:20 +0000 (17:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Feb 2009 01:00:20 +0000 (17:00 -0800)
commitaaccc2a8c493bb8278a0743bb8da590865c935fd
tree1ed9c919ee096fa0d97cb283ccb074e40898010d
parentde05eff984d89a226292962f9e8128851a358df5
wimax: fix oops in wimax_dev_get_by_genl_info() when looking up non-wimax iface

When a non-wimax interface is looked up by the stack, a bad pointer is
returned when the looked-up interface is not found in the list (of
registered WiMAX interfaces). This causes an oops in the caller when
trying to use the pointer.

Fix by properly setting the pointer to NULL if we don't exit from the
list_for_each() with a found entry.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/wimax/id-table.c