diff options
-rw-r--r-- | fs/proc/base.c | 2 | ||||
-rw-r--r-- | kernel/audit.c | 11 | ||||
-rw-r--r-- | kernel/audit_tree.c | 5 |
3 files changed, 9 insertions, 9 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 808cbdc193d3..c447e0743a3c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2441,7 +2441,7 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2441 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), | 2441 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), |
2442 | #ifdef CONFIG_AUDITSYSCALL | 2442 | #ifdef CONFIG_AUDITSYSCALL |
2443 | REG("loginuid", S_IWUSR|S_IRUGO, loginuid), | 2443 | REG("loginuid", S_IWUSR|S_IRUGO, loginuid), |
2444 | REG("sessionid", S_IRUSR, sessionid), | 2444 | REG("sessionid", S_IRUGO, sessionid), |
2445 | #endif | 2445 | #endif |
2446 | #ifdef CONFIG_FAULT_INJECTION | 2446 | #ifdef CONFIG_FAULT_INJECTION |
2447 | REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject), | 2447 | REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject), |
diff --git a/kernel/audit.c b/kernel/audit.c index b7d3709cc452..e8692a5748c2 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -572,16 +572,17 @@ void audit_send_reply(int pid, int seq, int type, int done, int multi, | |||
572 | 572 | ||
573 | skb = audit_make_reply(pid, seq, type, done, multi, payload, size); | 573 | skb = audit_make_reply(pid, seq, type, done, multi, payload, size); |
574 | if (!skb) | 574 | if (!skb) |
575 | return; | 575 | goto out; |
576 | 576 | ||
577 | reply->pid = pid; | 577 | reply->pid = pid; |
578 | reply->skb = skb; | 578 | reply->skb = skb; |
579 | 579 | ||
580 | tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply"); | 580 | tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply"); |
581 | if (IS_ERR(tsk)) { | 581 | if (!IS_ERR(tsk)) |
582 | kfree(reply); | 582 | return; |
583 | kfree_skb(skb); | 583 | kfree_skb(skb); |
584 | } | 584 | out: |
585 | kfree(reply); | ||
585 | } | 586 | } |
586 | 587 | ||
587 | /* | 588 | /* |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 9ef5e0aacc3c..f7921a2ecf16 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -172,10 +172,9 @@ static void insert_hash(struct audit_chunk *chunk) | |||
172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) | 172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) |
173 | { | 173 | { |
174 | struct list_head *list = chunk_hash(inode); | 174 | struct list_head *list = chunk_hash(inode); |
175 | struct list_head *pos; | 175 | struct audit_chunk *p; |
176 | 176 | ||
177 | list_for_each_rcu(pos, list) { | 177 | list_for_each_entry_rcu(p, list, hash) { |
178 | struct audit_chunk *p = container_of(pos, struct audit_chunk, hash); | ||
179 | if (p->watch.inode == inode) { | 178 | if (p->watch.inode == inode) { |
180 | get_inotify_watch(&p->watch); | 179 | get_inotify_watch(&p->watch); |
181 | return p; | 180 | return p; |