diff options
| author | Tim Sell <[email protected]> | 2015-07-09 13:27:52 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-07-14 18:34:59 -0700 |
| commit | 8d0119d8e81f93cf3c1bc2b6e7a39e28620cda1a (patch) | |
| tree | eb5937e25c016c25ecb3c9897b38ebc1be4bc9aa /include/linux/pps_kernel.h | |
| parent | 051e9fbbba1594331a9b3b2b157b5a0ce54b9a43 (diff) | |
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 <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux/pps_kernel.h')
0 files changed, 0 insertions, 0 deletions