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>
Sat, 26 Nov 2022 08:24:48 +0000 (09:24 +0100)
commitbccece3c3331424b097daeb022c102e04a634b39
tree4cec48628a4a109bddcadc648b026d35d24c448c
parent8cddb0d96b9cfe93852dfefca9fd67be149c379d
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: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/ioctl.c