The patch titled lib/vsprintf.c: fix interaction of kasprintf() and vsnprintf() when using %pV has been added to the -mm tree. Its filename is lib-vsprintfc-fix-interaction-of-kasprintf-and-vsnprintf-when-using-%pv.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: lib/vsprintf.c: fix interaction of kasprintf() and vsnprintf() when using %pV From: "Jan Beulich" <JBeulich@xxxxxxxxxx> Otherwise, the warning at the top of vsnprintf() gets triggered by kvasprintf()'s first invocation (with NULL buffer and zero size) of vsnprintf(). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN lib/vsprintf.c~lib-vsprintfc-fix-interaction-of-kasprintf-and-vsnprintf-when-using-%pv lib/vsprintf.c --- a/lib/vsprintf.c~lib-vsprintfc-fix-interaction-of-kasprintf-and-vsnprintf-when-using-%pv +++ a/lib/vsprintf.c @@ -898,7 +898,7 @@ char *pointer(const char *fmt, char *buf case 'U': return uuid_string(buf, end, ptr, spec, fmt); case 'V': - return buf + vsnprintf(buf, end - buf, + return buf + vsnprintf(buf, end > buf ? end - buf : 0, ((struct va_format *)ptr)->fmt, *(((struct va_format *)ptr)->va)); case 'K': _ Patches currently in -mm which might be from JBeulich@xxxxxxxxxx are linux-next.patch lib-vsprintfc-fix-interaction-of-kasprintf-and-vsnprintf-when-using-%pv.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html