mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] scsi:iscsi: handle iscsi_cls_conn device with sysfs
@ 2022-03-09  3:09 Wenchao Hao
  2022-03-09  3:09 ` [PATCH v2 1/3] scsi: iscsi: Add helper functions to manage iscsi_cls_conn Wenchao Hao
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wenchao Hao @ 2022-03-09  3:09 UTC (permalink / raw)
  To: Mike Christie, Lee Duncan, Chris Leech, James E . J . Bottomley,
	Martin K . Petersen, open-iscsi, linux-scsi, linux-kernel
  Cc: Wu Bo, Zhiqiang Liu, linfeilong, Wenchao Hao

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 correct the add and teardown flow
of iscsi_cls_conn.

-----------
V2:
  add two more iscsi_free_conn() and iscsi_remove_conn() than V1
  change the teardown flow of iscsi_cls_conn

Wenchao Hao (3):
  scsi: iscsi: Add helper functions to manage iscsi_cls_conn
  scsi:libiscsi: Add iscsi_cls_conn to sysfs after been initialized
  scsi:libiscsi: teardown iscsi_cls_conn gracefully

 drivers/scsi/libiscsi.c             | 21 ++++++---
 drivers/scsi/scsi_transport_iscsi.c | 72 +++++++++++++++++++++--------
 include/scsi/scsi_transport_iscsi.h |  5 +-
 3 files changed, 71 insertions(+), 27 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-09 11:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  3:09 [PATCH v2 0/3] scsi:iscsi: handle iscsi_cls_conn device with sysfs Wenchao Hao
2022-03-09  3:09 ` [PATCH v2 1/3] scsi: iscsi: Add helper functions to manage iscsi_cls_conn Wenchao Hao
2022-03-08 17:19   ` Mike Christie
2022-03-09 11:01     ` Wenchao Hao
2022-03-09  3:09 ` [PATCH v2 2/3] scsi:libiscsi: Add iscsi_cls_conn to sysfs after been initialized Wenchao Hao
2022-03-09  3:09 ` [PATCH v2 3/3] scsi:libiscsi: teardown iscsi_cls_conn gracefully Wenchao Hao
2022-03-08 17:20   ` Mike Christie
2022-03-08 17:24   ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®