Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

apparmor: Replace two seq_printf() calls by seq_puts() in aa_label_seq_xprint()

Two strings which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function “seq_puts”.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Markus Elfring and committed by
John Johansen
278de07e c79f46a2

+2 -2
+2 -2
security/apparmor/label.c
··· 1749 1749 AA_DEBUG("label print error"); 1750 1750 return; 1751 1751 } 1752 - seq_printf(f, "%s", str); 1752 + seq_puts(f, str); 1753 1753 kfree(str); 1754 1754 } else if (display_mode(ns, label, flags)) 1755 1755 seq_printf(f, "%s (%s)", label->hname, 1756 1756 label_modename(ns, label, flags)); 1757 1757 else 1758 - seq_printf(f, "%s", label->hname); 1758 + seq_puts(f, label->hname); 1759 1759 } 1760 1760 1761 1761 void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,