]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: Null-terminate filename passed to ethtool_ops::flash_device
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 1 Feb 2012 09:32:25 +0000 (09:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Feb 2012 19:47:17 +0000 (14:47 -0500)
commit09ea704da1d05ab4c59b2adb5a2437ebde775f5c
tree122ca6128b967fc4e91ff9a974181536a55f64ed
parent2b7891d45b26e5dcd003d0b6c196bde664069d28
ethtool: Null-terminate filename passed to ethtool_ops::flash_device

The parameters for ETHTOOL_FLASHDEV include a filename, which ought to
be null-terminated.  Currently the only driver that implements
ethtool_ops::flash_device attempts to add a null terminator if
necessary, but does it wrongly.  Do it in the ethtool core instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_ethtool.c
net/core/ethtool.c