Merge branch 'audit.b51' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b51' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] list_for_each_rcu must die: audit [patch 1/1] audit_send_reply(): fix error-path memory leak [PATCH] open sessionid permissions
This commit is contained in:
commit
16ae527bfa
|
@ -2441,7 +2441,7 @@ static const struct pid_entry tgid_base_stuff[] = {
|
||||||
REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust),
|
REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust),
|
||||||
#ifdef CONFIG_AUDITSYSCALL
|
#ifdef CONFIG_AUDITSYSCALL
|
||||||
REG("loginuid", S_IWUSR|S_IRUGO, loginuid),
|
REG("loginuid", S_IWUSR|S_IRUGO, loginuid),
|
||||||
REG("sessionid", S_IRUSR, sessionid),
|
REG("sessionid", S_IRUGO, sessionid),
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_FAULT_INJECTION
|
#ifdef CONFIG_FAULT_INJECTION
|
||||||
REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject),
|
REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject),
|
||||||
|
|
|
@ -572,16 +572,17 @@ void audit_send_reply(int pid, int seq, int type, int done, int multi,
|
||||||
|
|
||||||
skb = audit_make_reply(pid, seq, type, done, multi, payload, size);
|
skb = audit_make_reply(pid, seq, type, done, multi, payload, size);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
reply->pid = pid;
|
reply->pid = pid;
|
||||||
reply->skb = skb;
|
reply->skb = skb;
|
||||||
|
|
||||||
tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply");
|
tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply");
|
||||||
if (IS_ERR(tsk)) {
|
if (!IS_ERR(tsk))
|
||||||
kfree(reply);
|
return;
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
}
|
out:
|
||||||
|
kfree(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -172,10 +172,9 @@ static void insert_hash(struct audit_chunk *chunk)
|
||||||
struct audit_chunk *audit_tree_lookup(const struct inode *inode)
|
struct audit_chunk *audit_tree_lookup(const struct inode *inode)
|
||||||
{
|
{
|
||||||
struct list_head *list = chunk_hash(inode);
|
struct list_head *list = chunk_hash(inode);
|
||||||
struct list_head *pos;
|
struct audit_chunk *p;
|
||||||
|
|
||||||
list_for_each_rcu(pos, list) {
|
list_for_each_entry_rcu(p, list, hash) {
|
||||||
struct audit_chunk *p = container_of(pos, struct audit_chunk, hash);
|
|
||||||
if (p->watch.inode == inode) {
|
if (p->watch.inode == inode) {
|
||||||
get_inotify_watch(&p->watch);
|
get_inotify_watch(&p->watch);
|
||||||
return p;
|
return p;
|
||||||
|
|
Loading…
Reference in New Issue