]> git.karo-electronics.de Git - karo-tx-linux.git/commit
atl1: fix resume
authorLuca Tettamanti <kronos.it@gmail.com>
Wed, 22 Sep 2010 10:41:58 +0000 (10:41 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:27 +0000 (21:51 -0700)
commit6c4a46eccf8cb90c312ba93bccccb6857d07df80
tree04ae253ca6a7f1c42b02b64156b3c0b92c29cf51
parent7ca9783455c1226bcecd1e543b50e6cc38994535
atl1: fix resume

commit ec5a32f67c603b11d68eb283d94eb89a4f6cfce1 upstream.

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).

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/atlx/atl1.c