Closed
[OLK-6.6] 从kernel上游linux-6.6.y分支回合nvme驱动重要的bugfix #8558
WindRiver-shangbaogenAdd on  Feb 27Closed at  Mar 3
Feb 27 Create

从上游kernel stale tree v6.6.y分支回合nvme驱动重要的bugfix:
相关的commit如下:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=f532b29b0e313f42b964014038b0f52899b240ec

上述commit修复了一个可能导致系统deadlock的问题,详细信息如下:
当套接字在TCP_LISTEN状态下关闭时,会运行一个回调函数来刷新所有未处理的数据包,这反过来又会调用
nvmet_tcp_listen_data_ready()函数,并持有sk_callback_lock,根据出现问题时打印的call trace可以看
出,该线程持有锁时调度出了CPU。同样根据call trace可以看出,另外一个线程处理关闭任务的函数
nvmet_tcp_release_queue_work,尝试获取该锁,获取不到后也调度出了CPU。这样就导致任务hang住,
没办法继续往下处理。
详细的call trace和原因分析见如下链接:
https://lore.kernel.org/linux-nvme/CAHj4cs-zu7eVB78yUpFjVe2UqMWFkLk8p+DaS3qj+uiGCXBAoA@mail.gmail.com/
https://lore.kernel.org/linux-nvme/3ab1de01-7a55-4c7b-b183-49618dc93a09@suse.de/

修复的方案如下:
在尝试获取sk_callback_lock() 之前检查是否处于TCP_LISTEN状态,以避免死锁。

该patch比较重要需要移植到olk-6.6分支上.

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Feb 27 Added label: sig/Kernel
openeuler-ci-bot
openeuler-ci-botCollaborators
Feb 27 Comments:
likedislike
WWindRiver-shangbaogen
Feb 27 Associated pull request
Cchenjingwei0113
Feb 27 Associated pull request
Cchenjingwei0113
Feb 27 Deleted associated pull request: urma:kernel header of userctl
openeuler-ci-botopeneuler-ci-botCollaborators
Mar 3 Close issue
openeuler-ci-botopeneuler-ci-botCollaborators
Mar 3 changed custom state from 待办的 to 已完成