mirror of
https://github.com/adulau/aha.git
synced 2025-01-04 23:23:18 +00:00
[PATCH] lockdep: annotate pktcdvd natural device hierarchy
The pkt_*_dev functions operate on not-this-blockdevice, and that is sufficiently checked at setup time. As a result there is a natural hierarchy, which needs nesting annotations Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Osterlund <petero2@telia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
1e86240f3f
commit
8e185d8339
1 changed files with 3 additions and 3 deletions
|
@ -2577,19 +2577,19 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm
|
||||||
case PKT_CTRL_CMD_SETUP:
|
case PKT_CTRL_CMD_SETUP:
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
mutex_lock(&ctl_mutex);
|
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
|
||||||
ret = pkt_setup_dev(&ctrl_cmd);
|
ret = pkt_setup_dev(&ctrl_cmd);
|
||||||
mutex_unlock(&ctl_mutex);
|
mutex_unlock(&ctl_mutex);
|
||||||
break;
|
break;
|
||||||
case PKT_CTRL_CMD_TEARDOWN:
|
case PKT_CTRL_CMD_TEARDOWN:
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
mutex_lock(&ctl_mutex);
|
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
|
||||||
ret = pkt_remove_dev(&ctrl_cmd);
|
ret = pkt_remove_dev(&ctrl_cmd);
|
||||||
mutex_unlock(&ctl_mutex);
|
mutex_unlock(&ctl_mutex);
|
||||||
break;
|
break;
|
||||||
case PKT_CTRL_CMD_STATUS:
|
case PKT_CTRL_CMD_STATUS:
|
||||||
mutex_lock(&ctl_mutex);
|
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
|
||||||
pkt_get_status(&ctrl_cmd);
|
pkt_get_status(&ctrl_cmd);
|
||||||
mutex_unlock(&ctl_mutex);
|
mutex_unlock(&ctl_mutex);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue