NVMe: Metadata format support
A message that is not in the archive (sent off-list or not yet received): 20150225111035.GA27796@mwanda
Quoted 15 lines · Dan Carpenter
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;
Quoted 3 lines
The static check here really means that we should check the return from
kmap_atomic()before adding "bip->bip_vec->bv_offset". Cankmap_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.