diff options
author | Maurizio Lombardi <[email protected]> | 2023-04-07 15:00:33 +0200 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2023-04-11 20:49:43 -0400 |
commit | a0fde512f7030e7fbdd5f0d8d70908d37389aae2 (patch) | |
tree | 1bee7647a4b17b30f047158d562fc596d0ff2111 /drivers/usb/cdns3/cdns3-debug.h | |
parent | dc70c9615c067dbc34a1af736477f7d2b7f75319 (diff) |
scsi: target: core: Fix invalid memory access
nr_attrs should start counting from zero, otherwise we will end up
dereferencing an invalid memory address.
$ targetcli /loopback create
general protection fault
RIP: 0010:configfs_create_file+0x12/0x70
Call Trace:
<TASK>
configfs_attach_item.part.0+0x5f/0x150
configfs_attach_group.isra.0+0x49/0x120
configfs_mkdir+0x24f/0x4d0
vfs_mkdir+0x192/0x240
do_mkdirat+0x131/0x160
__x64_sys_mkdir+0x48/0x70
do_syscall_64+0x5c/0x90
Fixes: 31177b74790c ("scsi: target: core: Add RTPI attribute for target port")
Signed-off-by: Maurizio Lombardi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Dmitry Bogdanov <[email protected]>
Reviewed-by: Mike Christie <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions