Chris Wright b7300b78d1 blkdev: cgroup whitelist permission fix
The cgroup device whitelist code gets confused when trying to grant
permission to a disk partition that is not currently open.  Part of
blkdev_open() includes __blkdev_get() on the whole disk.

Basically, the only ways to reliably allow a cgroup access to a partition
on a block device when using the whitelist are to 1) also give it access
to the whole block device or 2) make sure the partition is already open in
a different context.

The patch avoids the cgroup check for the whole disk case when opening a
partition.

Addresses https://bugzilla.redhat.com/show_bug.cgi?id=589662

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Serge E. Hallyn <serue@us.ibm.com>
Reported-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11 08:59:18 -07:00
..
2010-08-09 16:48:53 -04:00
2010-08-09 16:47:51 -04:00
2010-08-05 14:23:45 -05:00
2010-08-09 16:48:45 -04:00
2010-08-09 16:48:01 -04:00
2010-08-09 16:48:17 -04:00
2010-08-09 16:48:16 -04:00
2010-08-09 16:47:49 -04:00
2010-08-09 16:47:31 -04:00
2010-08-09 16:48:00 -04:00
2010-08-09 16:48:02 -04:00
2010-08-05 13:21:23 -07:00
2010-08-09 16:47:33 -04:00
2010-08-11 08:59:02 -07:00
2010-08-09 16:48:44 -04:00
2010-08-09 16:47:43 -04:00