diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2015-05-10 23:16:55 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2015-05-10 23:16:55 +0530 |
commit | 52f479da0aef99cffafe73fa04dcbcfc0d4616dc (patch) | |
tree | 3d83230f08d91662e9e3823636ced40e045484a9 /security | |
parent | 146f542aac2cc725aa32f51b354eba5ece7ae08b (diff) | |
parent | 98fc0d41be3806ec5ffa160692a39e90b76898f0 (diff) |
Merge branch 'android-3.10' of https://android.googlesource.com/kernel/common
* android-3.10:
android: fiq_debugger: fix cut-off help message
ipv4: Missing sk_nulls_node_init() in ping_unhash().
android: base-cfg: add ALSA
usb: gadget: add audio dependencies to USB_G_ANDROID
SELinux: ss: Fix policy write for ioctl operations
nf: IDLETIMER: Adds the uid field in the msg
android: configs: Enable SELinux and its dependencies.
SELinux: use deletion-safe iterator to free list
subsystem: CPU FREQUENCY DRIVERS- Set cpu_load calculation on current frequency
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/avc.c | 6 | ||||
-rw-r--r-- | security/selinux/ss/avtab.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 5c8e7cfa9de3..f3dbbc0f15dd 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -298,13 +298,15 @@ static void avc_operation_decision_free( static void avc_operation_free(struct avc_operation_node *ops_node) { - struct avc_operation_decision_node *od_node; + struct avc_operation_decision_node *od_node, *tmp; if (!ops_node) return; - list_for_each_entry(od_node, &ops_node->od_head, od_list) + list_for_each_entry_safe(od_node, tmp, &ops_node->od_head, od_list) { + list_del(&od_node->od_list); avc_operation_decision_free(od_node); + } kmem_cache_free(avc_operation_node_cachep, ops_node); } diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index 2e4ff003abcd..dd7466cb2021 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c @@ -565,6 +565,9 @@ int avtab_write_item(struct policydb *p, struct avtab_node *cur, void *fp) return rc; if (cur->key.specified & AVTAB_OP) { + rc = put_entry(&cur->datum.u.ops->type, sizeof(u8), 1, fp); + if (rc) + return rc; for (i = 0; i < ARRAY_SIZE(cur->datum.u.ops->op.perms); i++) buf32[i] = cpu_to_le32(cur->datum.u.ops->op.perms[i]); rc = put_entry(buf32, sizeof(u32), |