From: Eric Paris <eparis@redhat.com>
To: torvalds@linux-foundation.org, jj@chaosbits.net
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
viro@zeniv.linux.org.uk
Subject: RE: [PATCH] audit: always follow va_copy() with va_end()
Date: Sun, 08 Jan 2012 19:53:51 -0500 (EST) [thread overview]
Message-ID: <139540383.1157551.1326070431707.JavaMail.root@zmail13.collab.prod.int.phx2.redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]
This one was committed to my audit tree which al promised to pull all of my audit tree into the vfs tree for 3.3, so if you want to take it Linus, you can add my ack as the maintainer. I'd expect to see it from Al early this week. Can't say anything about SCSI though...
-----Original Message-----
From: Jesper Juhl [jj@chaosbits.net]
Received: Sunday, 08 Jan 2012, 4:44pm
To: Linus Torvalds [torvalds@linux-foundation.org]
CC: Linux Kernel Mailing List [linux-kernel@vger.kernel.org]; Andrew Morton [akpm@linux-foundation.org]; Al Viro [viro@zeniv.linux.org.uk]; Eric Paris [eparis@redhat.com]
Subject: [PATCH] audit: always follow va_copy() with va_end()
A call to va_copy() should always be followed by a call to va_end() in the
same function. In kernel/autit.c::audit_log_vformat() this is not always
done. This patch makes sure va_end() is always called.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
kernel/audit.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 09fae26..2c1d6ab 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1260,12 +1260,13 @@ static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
avail = audit_expand(ab,
max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail));
if (!avail)
- goto out;
+ goto out_va_end;
len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2);
}
- va_end(args2);
if (len > 0)
skb_put(skb, len);
+out_va_end:
+ va_end(args2);
out:
return;
}
--
1.7.8.1
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
next reply other threads:[~2012-01-09 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 0:53 Eric Paris [this message]
2012-01-09 0:56 ` Al Viro
2012-01-09 2:09 ` Xi Wang
-- strict thread matches above, loose matches on Subject: below --
2012-01-08 19:51 Please merge two small bug fix patches from linux-next Jesper Juhl
2012-01-08 21:26 ` Linus Torvalds
2012-01-08 21:35 ` Jesper Juhl
2012-01-08 21:44 ` [PATCH] audit: always follow va_copy() with va_end() Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=139540383.1157551.1326070431707.JavaMail.root@zmail13.collab.prod.int.phx2.redhat.com \
--to=eparis@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®