lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2]scsi:libiscsi: Add iscsi_cls_conn device to sysfs correctly
Date
We found a NULL pointer dereference in iscsi_sw_tcp_conn_get_param(),
the root reason is we did sysfs addition wrong.

iscsi_create_conn() expose iscsi_cls_conn to sysfs while the related
resources are not initialized. So we should delay the calling of
device_add() until these resources has been initialized.

This patchset solve this issue by changing iscsi_conn_setup() and works
well for iscsi_tcp.

Wenchao Hao (2):
scsi: iscsi: Add helper functions to alloc and add iscsi_cls_conn
scsi:libiscsi: Add iscsi_cls_conn to sysfs after been initialized

drivers/scsi/libiscsi.c | 13 ++++-
drivers/scsi/scsi_transport_iscsi.c | 85 +++++++++++++++++++++++------
include/scsi/scsi_transport_iscsi.h | 3 +
3 files changed, 83 insertions(+), 18 deletions(-)

--
2.32.0

\
 
 \ /
  Last update: 2022-03-07 12:47    [W:4.441 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site