diff options
author | Eddie James <eajames@linux.ibm.com> | 2022-05-13 22:44:24 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2022-09-28 14:40:57 +0300 |
commit | d3e1e24604031b0d83b6c2d38f54eeea265cfcc0 (patch) | |
tree | a439e95df47d7ad5d51a684b516705001b9a2c19 /drivers/fsi/fsi-master-aspeed.c | |
parent | dbed963ed62c4c2b8870a02c8b7dcb0c2af3ee0b (diff) | |
download | linux-d3e1e24604031b0d83b6c2d38f54eeea265cfcc0.tar.xz |
fsi: occ: Prevent use after free
Use get_device and put_device in the open and close functions to
make sure the device doesn't get freed while a file descriptor is
open.
Also, lock around the freeing of the device buffer and check the
buffer before using it in the submit function.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220513194424.53468-1-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi/fsi-master-aspeed.c')
0 files changed, 0 insertions, 0 deletions