The patch titled Subject: device_cgroup: introduce dev_whitelist_clean() has been added to the -mm tree. Its filename is device_cgroup-introduce-dev_whitelist_clean.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Aristeu Rozanski <aris@xxxxxxxxxx> Subject: device_cgroup: introduce dev_whitelist_clean() This function cleans all the items in a whitelist and will be used by the next patches. Signed-off-by: Aristeu Rozanski <aris@xxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Li Zefan <lizefan@xxxxxxxxxx> Cc: James Morris <jmorris@xxxxxxxxx> Cc: Pavel Emelyanov <xemul@xxxxxxxxxx> Cc: Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- security/device_cgroup.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff -puN security/device_cgroup.c~device_cgroup-introduce-dev_whitelist_clean security/device_cgroup.c --- a/security/device_cgroup.c~device_cgroup-introduce-dev_whitelist_clean +++ a/security/device_cgroup.c @@ -154,6 +154,22 @@ remove: } } +/** + * dev_whitelist_clean - frees all entries of the whitelist + * @dev_cgroup: dev_cgroup with the whitelist to be cleaned + * + * called under devcgroup_mutex + */ +static void dev_whitelist_clean(struct dev_cgroup *dev_cgroup) +{ + struct dev_whitelist_item *wh, *tmp; + + list_for_each_entry_safe(wh, tmp, &dev_cgroup->whitelist, list) { + list_del(&wh->list); + kfree(wh); + } +} + /* * called from kernel/cgroup.c with cgroup_lock() held. */ @@ -200,13 +216,9 @@ static struct cgroup_subsys_state *devcg static void devcgroup_destroy(struct cgroup *cgroup) { struct dev_cgroup *dev_cgroup; - struct dev_whitelist_item *wh, *tmp; dev_cgroup = cgroup_to_devcgroup(cgroup); - list_for_each_entry_safe(wh, tmp, &dev_cgroup->whitelist, list) { - list_del(&wh->list); - kfree(wh); - } + dev_whitelist_clean(dev_cgroup); kfree(dev_cgroup); } _ Patches currently in -mm which might be from aris@xxxxxxxxxx are linux-next.patch x86-pat-remove-the-dependency-on-vm_pgoff-in-track-untrack-pfn-vma-routines.patch x86-pat-separate-the-pfn-attribute-tracking-for-remap_pfn_range-and-vm_insert_pfn.patch mm-x86-pat-rework-linear-pfn-mmap-tracking.patch mm-introduce-arch-specific-vma-flag-vm_arch_1.patch mm-kill-vma-flag-vm_insertpage.patch mm-kill-vma-flag-vm_can_nonlinear.patch mm-use-mm-exe_file-instead-of-first-vm_executable-vma-vm_file.patch mm-kill-vma-flag-vm_executable-and-mm-num_exe_file_vmas.patch mm-prepare-vm_dontdump-for-using-in-drivers.patch mm-kill-vma-flag-vm_reserved-and-mm-reserved_vm-counter.patch device_cgroup-add-deny_all-in-dev_cgroup-structure.patch device_cgroup-introduce-dev_whitelist_clean.patch device_cgroup-convert-device_cgroup-internally-to-policy-exceptions.patch device_cgroup-rename-whitelist-to-exception-list.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html