aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/vfs.py
diff options
context:
space:
mode:
authorXu Yang <xu.yang_2@nxp.com>2024-01-29 17:37:38 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-19 09:30:41 +0100
commit1c9be13846c0b2abc2480602f8ef421360e1ad9e (patch)
treebcc85d1dcfd8e4e4049ce2d96ef8d21d6a87f957 /scripts/gdb/linux/vfs.py
parent47625b018c6bc788bc10dd654c82696eb0a5ef11 (diff)
usb: roles: fix NULL pointer issue when put module's reference
In current design, usb role class driver will get usb_role_switch parent's module reference after the user get usb_role_switch device and put the reference after the user put the usb_role_switch device. However, the parent device of usb_role_switch may be removed before the user put the usb_role_switch. If so, then, NULL pointer issue will be met when the user put the parent module's reference. This will save the module pointer in structure of usb_role_switch. Then, we don't need to find module by iterating long relations. Fixes: 5c54fcac9a9d ("usb: roles: Take care of driver module reference counting") cc: stable@vger.kernel.org Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240129093739.2371530-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/vfs.py')
0 files changed, 0 insertions, 0 deletions