We're not allowed to use args twice; we need to use va_copy.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
{
int len, avail;
struct sk_buff *skb;
+ va_list args2;
if (!ab)
return;
if (!avail)
goto out;
}
+ va_copy(args2, args);
len = vsnprintf(skb->tail, avail, fmt, args);
if (len >= avail) {
/* The printk buffer is 1024 bytes long, so if we get
avail = audit_expand(ab, 1+len-avail);
if (!avail)
goto out;
- len = vsnprintf(skb->tail, avail, fmt, args);
+ len = vsnprintf(skb->tail, avail, fmt, args2);
}
skb_put(skb, (len < avail) ? len : avail);
out: