Re: [PATCH 2/2] target/iscsi: Fix a use-after-free while closing a session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/11/19 11:41 AM, Roman Bolshakov wrote:
On Mon, Nov 11, 2019 at 10:29:44AM -0800, Bart Van Assche wrote:
+static int target_release_res(struct se_device *dev, void *data)
+{
+	struct se_session *sess = data;
+
+	if (dev->reservation_holder == sess)
+		dev->reservation_holder = NULL;

Does it worth to use target_release_reservation() when the session is
reserveration holder instead of the explicit assignment? That would also
reset reservation flags of the se_device.

That sounds like a good idea to me. I will look into this.

IMO the code is not specific to iscsi and the tag should be changed to
"target/core:"

Agreed. I will fix the patch subject.

Bart.



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux