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

ntb: avoid format string in dev_set_name

Avoid any chance of format string expansion when calling dev_set_name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jon Mason <jdmason@kudzu.us>

authored by

Kees Cook and committed by
Jon Mason
e15f9409 30a4bb1e

+1 -1
+1 -1
drivers/ntb/ntb.c
··· 114 114 ntb->dev.bus = &ntb_bus; 115 115 ntb->dev.parent = &ntb->pdev->dev; 116 116 ntb->dev.release = ntb_dev_release; 117 - dev_set_name(&ntb->dev, pci_name(ntb->pdev)); 117 + dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev)); 118 118 119 119 ntb->ctx = NULL; 120 120 ntb->ctx_ops = NULL;