aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorXu Yang <[email protected]>2024-01-29 17:37:38 +0800
committerGreg Kroah-Hartman <[email protected]>2024-02-19 09:30:41 +0100
commit1c9be13846c0b2abc2480602f8ef421360e1ad9e (patch)
treebcc85d1dcfd8e4e4049ce2d96ef8d21d6a87f957 /lib/test_fortify/write_overflow-strncpy-src.c
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: [email protected] Signed-off-by: Xu Yang <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions