nvme: restrict management ioctls to admin
authorKeith Busch <kbusch@kernel.org>
Thu, 22 Sep 2022 14:54:06 +0000 (07:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:16:33 +0000 (11:16 +0100)
commit397ab6fbaf409e463a3d3e22bea5cb77809a5f81
treeb30c886c8e6115d7d42d9e60e3129f0b8624dd61
parent205c1e9ac56a5cd1a7d0bc457d8b38871f5b37ed
nvme: restrict management ioctls to admin

commit 23e085b2dead13b51fe86d27069895b740f749c0 upstream.

The passthrough commands already have this restriction, but the other
operations do not. Require the same capabilities for all users as all of
these operations, which include resets and rescans, can be disruptive.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
drivers/nvme/host/core.c