net: ethernet: wiznet: avoid format string exposure

While unlikely, this makes sure any format strings in the device name
can't exposure information via the resulting workqueue name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Kees Cook 2017-04-05 14:39:35 -07:00 committed by David S. Miller
parent df656bf6fb
commit 129858fa0b
1 changed files with 2 additions and 1 deletions

View File

@ -1152,7 +1152,8 @@ int w5100_probe(struct device *dev, const struct w5100_ops *ops,
if (err < 0)
goto err_register;
priv->xfer_wq = alloc_workqueue(netdev_name(ndev), WQ_MEM_RECLAIM, 0);
priv->xfer_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0,
netdev_name(ndev));
if (!priv->xfer_wq) {
err = -ENOMEM;
goto err_wq;