apparmor: convert profile lists to RCU based locking
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
dd51c84857
commit
01e2b670aa
4 changed files with 167 additions and 111 deletions
|
|
@ -78,6 +78,12 @@ static inline void *kvzalloc(size_t size)
|
|||
return __aa_kvmalloc(size, __GFP_ZERO);
|
||||
}
|
||||
|
||||
/* returns 0 if kref not incremented */
|
||||
static inline int kref_get_not0(struct kref *kref)
|
||||
{
|
||||
return atomic_inc_not_zero(&kref->refcount);
|
||||
}
|
||||
|
||||
/**
|
||||
* aa_strneq - compare null terminated @str to a non null terminated substring
|
||||
* @str: a null terminated string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue