scst: Introduce tgt_dev.tgtt

A later patch will free tgt_devs after an RCU grace period. Make it
safe to access the target template pointer after an RCU grace period.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8474 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-07-24 01:09:25 +00:00
parent 89b1c2fb99
commit 0ac23deee2
3 changed files with 7 additions and 7 deletions

View File

@@ -3104,6 +3104,7 @@ struct scst_tgt_dev {
/* List entry in sess->sess_tgt_dev_list */
struct list_head sess_tgt_dev_list_entry;
struct scst_tgt_template *tgtt; /* to avoid use-after-free issues */
struct scst_device *dev; /* to save extra dereferences */
uint64_t lun; /* to save extra dereferences */