[PATCH V2] nvme-cli/list: fix when nvme device can not be open

Keith Busch keith.busch at intel.com
Wed Aug 2 01:02:05 PDT 2017


On Wed, Aug 02, 2017 at 03:51:09PM +0800, Guan Junxiong wrote:
> This patch checks the validity of fd returned by open operation on
> the nvme divices. For example, when a user who doesn't have the
> permission to open the device trys to use nvme list command to list
> nvme devices, the fd is returned as -1 and errno indicates permission
> denied.
> In addition,this patch closes the current open device before
> processing the next device.
> 
> Signed-off-by: Guan Junxiong <guanjunxiong at huawei.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>

Applied to the repo, thanks for the resend.



More information about the Linux-nvme mailing list