nvme: restrict management ioctls to admin
authorKeith Busch <kbusch@kernel.org>
Thu, 22 Sep 2022 14:54:06 +0000 (07:54 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 27 Sep 2022 07:15:56 +0000 (09:15 +0200)
commit23e085b2dead13b51fe86d27069895b740f749c0
tree7d3b95a331f60e60acb401c4aaabd84039facd18
parenta8eb6c1ba48bddea82e8d74cbe6e119f006be97d
nvme: restrict management ioctls to admin

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>
drivers/nvme/host/ioctl.c