linux/drivers/staging/unisys
Tim Sell 8d0119d8e8 staging: unisys: visornic: prevent erroneous kfree of devdata pointer
A struct visornic_devdata for each visornic device is actually allocated as
part of alloc_etherdev(), here in visornic_probe():

    netdev = alloc_etherdev(sizeof(struct visornic_devdata));

But code in devdata_release() was treating devdata as a pointer that needed
to be kfree()d!  This was causing all sorts of weird behavior after doing
an rmmod of visornic, both because free_netdev() was actually freeing the
memory used for devdata, and because devdata wasn't pointing to
dynamically-allocated memory in the first place.

The kfree(devdata) and the kref that tracked devdata's usage have been
appropriately deleted.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:34:59 -07:00
..
Documentation staging: unisys: ABI documentation for new sysfs entries 2014-07-24 15:07:59 -07:00
include staging: unisys: prevent faults processing messages 2015-07-14 18:34:58 -07:00
visorbus staging: unisys: respond to msgs post device_create 2015-07-14 18:34:58 -07:00
visornic staging: unisys: visornic: prevent erroneous kfree of devdata pointer 2015-07-14 18:34:59 -07:00
Kconfig staging: unisys: Add s-Par visornic ethernet driver 2015-06-16 14:34:55 -07:00
MAINTAINERS staging: s-Par driver documentation 2014-03-04 17:04:28 -08:00
Makefile staging: unisys: Add s-Par visornic ethernet driver 2015-06-16 14:34:55 -07:00
TODO staging: unisys: update MAINTAINERS and TODO 2014-03-08 22:42:14 -08:00