diff options
author | Tony Krowiak <[email protected]> | 2023-03-20 11:04:47 -0400 |
---|---|---|
committer | Vasily Gorbik <[email protected]> | 2023-03-27 17:23:08 +0200 |
commit | 8f8cf767589f2131ae5d40f3758429095c701c84 (patch) | |
tree | eee3d470115a170e13d1a03137e2242a49075a83 /scripts/gdb/linux/timerlist.py | |
parent | 89aba4c26fae4e459f755a18912845c348ee48f3 (diff) |
s390/vfio-ap: fix memory leak in vfio_ap device driver
The device release callback function invoked to release the matrix device
uses the dev_get_drvdata(device *dev) function to retrieve the
pointer to the vfio_matrix_dev object in order to free its storage. The
problem is, this object is not stored as drvdata with the device; since the
kfree function will accept a NULL pointer, the memory for the
vfio_matrix_dev object is never freed.
Since the device being released is contained within the vfio_matrix_dev
object, the container_of macro will be used to retrieve its pointer.
Fixes: 1fde573413b5 ("s390: vfio-ap: base implementation of VFIO AP device driver")
Signed-off-by: Tony Krowiak <[email protected]>
Reviewed-by: Harald Freudenberger <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions