Re: use-after-free in srpt_enable_tpg()

From: Bart Van Assche
Date: Thu Jun 30 2022 - 14:43:02 EST


On 6/30/22 09:40, Mike Christie wrote:
On 6/27/22 11:37 AM, Bart Van Assche wrote:
On 6/27/22 00:09, lizhijian@xxxxxxxxxxx wrote:
So far, I doubt if the previous defect of configfs mentioned in
9b64f7d0b: "(RDMA/srpt: Postpone HCA removal until after configfs
directory removal)" has got a better solution. if not, i have no a
clear mechanism to avoid it yet.

feedbacks are very welcome.
Mike, are you perhaps aware of any plans to add functions to the LIO core for removing tpg and wwn objects?


I don't know any work being done in this area. I was only working
on the refcounting/configfs parts for sessions in those configfs/sysfs
patchsets. However, I think I hit similar issues with the session.
I went around the world with solutions but didn't really like them
so I never pushed the patches for inclusion.

What was the hang caused by 9b64f7d0bb0a?

Hi Mike,

I have not been able to find Honggang's bug report that led to the revert of that commit. I guess that the hang happened in the while-loop in srpt_release_sport() that was modified by commit 9b64f7d0bb0a.

Thanks,

Bart.