Re: [PATCH] lightnvm: centralize permission check for lightnvm ioctl

2018-02-26 Thread Matias Bjørling
On 02/26/2018 01:11 PM, Johannes Thumshirn wrote: Currently all functions for handling the lightnvm core ioctl commands do a check for CAP_SYS_ADMIN. Change this to fail early in nvm_ctl_ioctl(), so we don't have to duplicate the permission checks all over. Signed-off-by: Johannes Thumshirn --

[PATCH] lightnvm: centralize permission check for lightnvm ioctl

2018-02-26 Thread Johannes Thumshirn
Currently all functions for handling the lightnvm core ioctl commands do a check for CAP_SYS_ADMIN. Change this to fail early in nvm_ctl_ioctl(), so we don't have to duplicate the permission checks all over. Signed-off-by: Johannes Thumshirn --- drivers/lightnvm/core.c | 21 +++-