Revert "CHROMIUM: Fix kref usage"
authorLeann Ogasawara <leann.ogasawara@canonical.com>
Fri, 27 Jan 2012 19:07:37 +0000 (11:07 -0800)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:18:38 +0000 (13:18 -0700)
This reverts commit 1750f615d552fa8ac143a34ed42fbc800500262d.

https://lists.ubuntu.com/archives/kernel-team/2012-January/018695.html

"At this point, since there are no consumers of the old API, and it
will be almost certainly replaced by the BPF API, I think in the face
of the 5-year support of the LTS release, we should probably just
remove all of the seccomp_filter patches from Ubuntu." - Kees Cook

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

kernel/seccomp_filter.c

index c551b9c..ac682cf 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <linux/capability.h>
 #include <linux/compat.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/ftrace_event.h>
@@ -647,12 +646,13 @@ void put_seccomp_filters(struct seccomp_filters *orig)
 {
        if (!orig)
                return;
-       kref_put(&orig->usage, __put_seccomp_filters);
+       kref_put(orig, __put_seccomp_filters);
 }
 
 /* get_seccomp_filters - increments the reference count of @orig. */
 struct seccomp_filters *get_seccomp_filters(struct seccomp_filters *orig)
 {
+       int usage;
        if (!orig)
                return NULL;
        /* XXX: kref needs overflow prevention support. */