]> git.openfabrics.org - ~tnikolova/compat/.git/commit
compat: Fix panic caused by NULL pointer derefence in rtnl_fill_ifinfo
authorRajkumar Manoharan <rmanoharan@atheros.com>
Tue, 29 Jun 2010 06:38:07 +0000 (12:08 +0530)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 29 Jun 2010 15:18:07 +0000 (08:18 -0700)
commit776ba1d5eee6b217e3333740170c2339a1aea155
tree8e84881c6a7e3faee31b701562937edf54e13aa8
parent126c387b239ace4ae5afa42884a91af41b491971
compat: Fix panic caused by NULL pointer derefence in rtnl_fill_ifinfo

get stats netdev ops is blindy called for older kernels (< 2.6.29) and
so assigning a NULL pointer from netdev_attach_ops causes a NULL pointer
dereference.

By default, netdev alloc provides an internal stats reference. So fill
this only if ndo_get_stats is defined.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
compat/compat-2.6.29.c