On Sun, 2019-06-23 at 08:37 -0700, David Miller wrote:
> From: Daniele Venzano <[email protected]>
> Date: Sun, 23 Jun 2019 11:13:28 +0200
>
> > Hello,
> >
> > I think it is good to know just by looking at the sources that the
> > driver is still kept up-to-date, so I am in favor of this patch.
>
> I absolutely, strongly, disagree.
>
> These are pointless.
Perhaps (most)? all the .get_drvinfo function calls where the
driver version is returned should use the default release.
This is similar to net/wireless/ethtool.c
Maybe:
---
net/core/ethtool.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 4d1011b2e24f..644a2043714c 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -23,6 +23,7 @@
#include <linux/rtnetlink.h>
#include <linux/sched/signal.h>
#include <linux/net.h>
+#include <linux/utsname.h>
#include <net/devlink.h>
#include <net/xdp_sock.h>
#include <net/flow_offload.h>
@@ -806,6 +807,8 @@ static noinline_for_stack int ethtool_get_drvinfo(struct
net_device *dev,
devlink_compat_running_version(dev, info.fw_version,
sizeof(info.fw_version));
+ strlcpy(info.version, init_utsname()->release, sizeof(info.version));
+
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;