diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2014-09-08 11:03:45 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2014-09-08 11:03:45 +0530 |
commit | bce75d40706fae43e949a878cb8783e743405f45 (patch) | |
tree | 3fa149ccf28645e6cc46065827efc7df5f7d3b45 /security | |
parent | 4f1d8e6268ed69b913f9d7030668416e4e74ee3a (diff) | |
parent | 42df511db0372b4878b322d812b975e4632a2928 (diff) |
Merge branch 'upstream/android-3.10' into 'linaro-fixes/android-3.10'
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/include/apparmor.h | 1 | ||||
-rw-r--r-- | security/apparmor/lib.c | 32 |
2 files changed, 0 insertions, 33 deletions
diff --git a/security/apparmor/include/apparmor.h b/security/apparmor/include/apparmor.h index 40aedd9f73ea..4a8cbfeef8b3 100644 --- a/security/apparmor/include/apparmor.h +++ b/security/apparmor/include/apparmor.h @@ -65,7 +65,6 @@ extern int apparmor_initialized __initdata; char *aa_split_fqname(char *args, char **ns_name); void aa_info_message(const char *str); void *kvmalloc(size_t size); -void kvfree(void *buffer); /** diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index 7430298116d6..ce8d9a84ab2d 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -103,35 +103,3 @@ void *kvmalloc(size_t size) } return buffer; } - -/** - * do_vfree - workqueue routine for freeing vmalloced memory - * @work: data to be freed - * - * The work_struct is overlaid to the data being freed, as at the point - * the work is scheduled the data is no longer valid, be its freeing - * needs to be delayed until safe. - */ -static void do_vfree(struct work_struct *work) -{ - vfree(work); -} - -/** - * kvfree - free an allocation do by kvmalloc - * @buffer: buffer to free (MAYBE_NULL) - * - * Free a buffer allocated by kvmalloc - */ -void kvfree(void *buffer) -{ - if (is_vmalloc_addr(buffer)) { - /* Data is no longer valid so just use the allocated space - * as the work_struct - */ - struct work_struct *work = (struct work_struct *) buffer; - INIT_WORK(work, do_vfree); - schedule_work(work); - } else - kfree(buffer); -} |