diff options
| author | 2022-03-07 19:17:52 +0800 | |
|---|---|---|
| committer | 2022-03-08 22:52:09 -0500 | |
| commit | 2bd3b6b75946db2ace06e145d53988e10ed7e99a (patch) | |
| tree | 266f499d309c14ed839180a60339acef75b35675 /samples/git:/ssh:/git@git.zx2c4.com | |
| parent | scsi: ufs: docs: UFS documentation corrections (diff) | |
| download | linux-dev-2bd3b6b75946db2ace06e145d53988e10ed7e99a.tar.xz linux-dev-2bd3b6b75946db2ace06e145d53988e10ed7e99a.zip | |
scsi: ufs: core: scsi_get_lba() error fix
When ufs initializes without scmd->device->sector_size set, scsi_get_lba()
will get a wrong shift number and trigger an ubsan error. The shift
exponent 4294967286 is too large for the 64-bit type 'sector_t' (aka
'unsigned long long').
Call scsi_get_lba() only when opcode is READ_10/WRITE_10/UNMAP.
Link: https://lore.kernel.org/r/20220307111752.10465-1-peter.wang@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'samples/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
