BugLink: http://bugs.launchpad.net/bugs/887780
Also fixes some compile warnings.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
#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>
{
if (!orig)
return;
- kref_put(orig, __put_seccomp_filters);
+ kref_put(&orig->usage, __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. */