u-boot/drivers/nvme
Bin Meng 52a5690efb nvme: Fix potential sign extension issue in nvme_blk_rw()
"lbas" with type "u16" (16 bits, unsigned) is promoted in
"lbas << ns->lba_shift" to type "int" (32 bits, signed), then
sign-extended to type "unsigned long long" (64 bits, unsigned).
If "lbas << ns->lba_shift" is greater than 0x7FFFFFFF, the upper
bits of the result will all be 1.

Fix it by casting "lbas" to "u32".

Reported-by: Coverity (CID: 166730)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-03 15:30:33 -04:00
..
Kconfig nvme: Add NVM Express driver support 2017-08-13 15:17:31 -04:00
Makefile nvme: Add show routine to print detailed information 2017-08-13 15:17:31 -04:00
nvme-uclass.c nvme: Get rid of the global variable nvme_info 2017-08-28 07:17:14 -04:00
nvme.c nvme: Fix potential sign extension issue in nvme_blk_rw() 2017-09-03 15:30:33 -04:00
nvme.h nvme: Get rid of the global variable nvme_info 2017-08-28 07:17:14 -04:00
nvme_show.c nvme: Apply cache operations on the DMA buffers 2017-08-28 07:17:13 -04:00