NVMe: Metadata format support
Keith Busch
keith.busch at intel.com
Thu Feb 26 14:15:55 PST 2015
On Wed, 25 Feb 2015, Dan Carpenter wrote:
> The patch e1e5e5641e6f: "NVMe: Metadata format support" from Feb 19,
> 2015, leads to the following static checker warning:
>
> drivers/block/nvme-core.c:524 nvme_dif_remap()
> warn: 'pmap' can't be NULL.
>
> drivers/block/nvme-core.c
> 519 bip = bio_integrity(req->bio);
> 520 if (!bip)
> 521 return;
> 522
> 523 pmap = kmap_atomic(bip->bip_vec->bv_page) + bip->bip_vec->bv_offset;
> 524 if (!pmap)
> 525 return;
>
> The static check here really means that we should check the return from
> kmap_atomic() before adding "bip->bip_vec->bv_offset". Can
> kmap_atomic() fail here anyway? I don't know.
I didn't find a single kmap_atomic caller in the kernel checking for NULL.
I'll remove it.
More information about the Linux-nvme
mailing list