]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Don't allow unsupported flags
authorKeith Busch <keith.busch@intel.com>
Wed, 24 Feb 2016 16:15:57 +0000 (09:15 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 3 Mar 2016 21:42:50 +0000 (14:42 -0700)
commit5e6028097167c334e13c1659b337fcfc271158ce
treebf9ced59312fab61bec342bb406b2367c74040b1
parenta6e2342fb013814e58569bce80b77ba3e22dc3bb
NVMe: Don't allow unsupported flags

The command flags can change the meaning of other fields in the command
that the driver is not prepared to handle. Specifically, the user could
passthrough an SGL flag, causing the controller to misinterpret the PRP
list the driver created, potentially corrupting memory or data.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c