Re: [PATCH 5.10] nvme: use nvme_cid to generate command_id in trace event

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

 



On Wed, Mar 06, 2024 at 07:25:06PM +0800, Li Lingfeng wrote:
> From: Li Lingfeng <lilingfeng3@xxxxxxxxxx>
> 
> A null-ptr-deref problem may occur since commit 706960d328f5 ("nvme: use
> command_id instead of req->tag in trace_nvme_complete_rq()") tries to get
> command_id by nvme_req(req)->cmd while nvme_req(req)->cmd is NULL.
> The problem has been sloved since the patch has been reverted by commit
> 929ba86476b3. However, cmd->common.command_id is set to req->tag again
> which should be ((genctl & 0xf)< 12 | req->tag).
> Generating command_id by nvme_cid() in trace event instead of
> nvme_req(req)->cmd->common.command_id to set it to
> ((genctl & 0xf)< 12 | req->tag) without trigging the null-ptr-deref
> problem.
> 
> Fixes: commit 706960d328f5 ("nvme: use command_id instead of req->tag in trace_nvme_complete_rq()")

This committ is reverted in the 5.10.208 release, so is this change
still needed?

thanks,

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux