diff options
-rw-r--r-- | drivers/block/loop.c | 4 | ||||
-rw-r--r-- | include/linux/loop.h | 2 | ||||
-rw-r--r-- | init/Kconfig | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 3bba65510d23..e9d594fd12cb 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -1038,10 +1038,10 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info) | |||
1038 | { | 1038 | { |
1039 | int err; | 1039 | int err; |
1040 | struct loop_func_table *xfer; | 1040 | struct loop_func_table *xfer; |
1041 | uid_t uid = current_uid(); | 1041 | kuid_t uid = current_uid(); |
1042 | 1042 | ||
1043 | if (lo->lo_encrypt_key_size && | 1043 | if (lo->lo_encrypt_key_size && |
1044 | lo->lo_key_owner != uid && | 1044 | !uid_eq(lo->lo_key_owner, uid) && |
1045 | !capable(CAP_SYS_ADMIN)) | 1045 | !capable(CAP_SYS_ADMIN)) |
1046 | return -EPERM; | 1046 | return -EPERM; |
1047 | if (lo->lo_state != Lo_bound) | 1047 | if (lo->lo_state != Lo_bound) |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 11a41a8f08eb..9635116dd830 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -44,7 +44,7 @@ struct loop_device { | |||
44 | int lo_encrypt_key_size; | 44 | int lo_encrypt_key_size; |
45 | struct loop_func_table *lo_encryption; | 45 | struct loop_func_table *lo_encryption; |
46 | __u32 lo_init[2]; | 46 | __u32 lo_init[2]; |
47 | uid_t lo_key_owner; /* Who set the key */ | 47 | kuid_t lo_key_owner; /* Who set the key */ |
48 | int (*ioctl)(struct loop_device *, int cmd, | 48 | int (*ioctl)(struct loop_device *, int cmd, |
49 | unsigned long arg); | 49 | unsigned long arg); |
50 | 50 | ||
diff --git a/init/Kconfig b/init/Kconfig index f0371a65ac06..f31599739f7f 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -960,7 +960,6 @@ config UIDGID_CONVERTED | |||
960 | depends on !UML || HOSTFS = n | 960 | depends on !UML || HOSTFS = n |
961 | 961 | ||
962 | # The rare drivers that won't build | 962 | # The rare drivers that won't build |
963 | depends on BLK_DEV_LOOP = n | ||
964 | depends on ANDROID_BINDER_IPC = n | 963 | depends on ANDROID_BINDER_IPC = n |
965 | 964 | ||
966 | # Security modules | 965 | # Security modules |