diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-08-16 22:26:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-17 07:07:06 +0300 |
commit | bd71ea60673180eccf17b1a1dda3504a04783789 (patch) | |
tree | a197ec69e32a451efe9af94fd08cca4096ad8f27 | |
parent | c530189905efe91b6a464db4ec1b56b4c069609f (diff) | |
download | linux-bd71ea60673180eccf17b1a1dda3504a04783789.tar.xz |
net: devlink: Remove overzealous WARN_ON with snapshots
It is possible to trigger this WARN_ON from user space by triggering a
devlink snapshot with an ID which already exists. We don't need both
-EEXISTS being reported and spamming the kernel log.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index e674f0f46dc2..e5feb87beca7 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4063,7 +4063,7 @@ static int __devlink_snapshot_id_insert(struct devlink *devlink, u32 id) { lockdep_assert_held(&devlink->lock); - if (WARN_ON(xa_load(&devlink->snapshot_ids, id))) + if (xa_load(&devlink->snapshot_ids, id)) return -EEXIST; return xa_err(xa_store(&devlink->snapshot_ids, id, xa_mk_value(0), |