]> git.baikalelectronics.ru Git - kernel.git/commit
atl1: fix resume
authorLuca Tettamanti <kronos.it@gmail.com>
Wed, 22 Sep 2010 10:41:58 +0000 (10:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Sep 2010 20:52:45 +0000 (13:52 -0700)
commitd45193db031d68b333c5522e7c0a41373723ed01
tree5f7d7f48f40bf998390da7da43ef40dddfb3d933
parent4fdffdc67b7a939ef530b428d80bf12ea1321f97
atl1: fix resume

adapter->cmb.cmb is initialized when the device is opened and freed when
it's closed. Accessing it unconditionally during resume results either
in a crash (NULL pointer dereference, when the interface has not been
opened yet) or data corruption (when the interface has been used and
brought down adapter->cmb.cmb points to a deallocated memory area).

Cc: stable@kernel.org
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Chris Snook <chris.snook@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/atlx/atl1.c