diff options
| author | Chanwoo Lee <cw9316.lee@samsung.com> | 2026-05-29 04:07:39 +0300 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2026-06-02 04:57:52 +0300 |
| commit | 4cf752f6b99ab63506cde5a611d4219e97adbd84 (patch) | |
| tree | 8ac8578cc16586c858ee2a3b7d912f0eb38b15f2 /scripts/dev-needs.sh | |
| parent | c39a9a02bc5d841c116dc03c264eb9ceecde806e (diff) | |
| download | linux-4cf752f6b99ab63506cde5a611d4219e97adbd84.tar.xz | |
scsi: ufs: core: Fix NULL pointer dereference in scsi_cmd_priv() calls
ufshcd_tag_to_cmd() may return NULL if no command is associated with the
given tag. However, several callers dereference the returned cmd pointer
via scsi_cmd_priv() without checking for NULL first, leading to a
potential NULL pointer dereference.
Fix this by adding NULL checks for cmd before calling scsi_cmd_priv()
and moving the lrbp initialization after the NULL check.
Signed-off-by: Chanwoo Lee <cw9316.lee@samsung.com>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260529010739.295391-1-cw9316.lee@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/dev-needs.sh')
0 files changed, 0 insertions, 0 deletions
