[PATCHv4-4.5 7/7] NVMe: Fix 0-length integrity payload

Johannes Thumshirn jthumshirn at suse.de
Thu Feb 25 00:13:21 PST 2016


On Wed, Feb 24, 2016 at 09:15:58AM -0700, Keith Busch wrote:
> A user could send a passthrough IO command with a metadata pointer to a
> namespace without metadata. With metadata length of 0, kmalloc returns
> ZERO_SIZE_PTR. Since that is not NULL, the driver would have set this as
> the bio's integrity payload, which causes an access fault on completion.
> 
> This patch ignores the users metadata buffer if the namespace format
> does not support separate metadata.
> 
> Reported-by: Stephen Bates <stephen.bates at microsemi.com>
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> Reviewed-by: Sagi Grimberg <sagig at mellanox.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>

Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



More information about the Linux-nvme mailing list