smsc95xx: fix suspend buffer overflow
authorSteve Glendinning <steve.glendinning@shawell.net>
Fri, 30 Nov 2012 05:55:48 +0000 (05:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Nov 2012 17:27:20 +0000 (12:27 -0500)
commiteed9a72914a2b2737a0d91b80579f878999574ef
tree134cb904d6fe8a161ba136f1f5d3d81137a63855
parente3c678e6d7484dc03fc36d3bfebb8ebb94574110
smsc95xx: fix suspend buffer overflow

This patch fixes a buffer overflow introduced by bbd9f9e, where
the filter_mask array is accessed beyond its bounds.

Updated to also add a check for kzalloc failure, as reported by
Bjorn Mork and Joe Perches.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Cc: Bjorn Mork <bjorn@mork.no>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c