Skip to content

Commit bd71ea6

Browse files
lunndavem330
authored andcommitted
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 <[email protected]> Tested-by: Chris Healy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c530189 commit bd71ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4063,7 +4063,7 @@ static int __devlink_snapshot_id_insert(struct devlink *devlink, u32 id)
40634063
{
40644064
lockdep_assert_held(&devlink->lock);
40654065

4066-
if (WARN_ON(xa_load(&devlink->snapshot_ids, id)))
4066+
if (xa_load(&devlink->snapshot_ids, id))
40674067
return -EEXIST;
40684068

40694069
return xa_err(xa_store(&devlink->snapshot_ids, id, xa_mk_value(0),

0 commit comments

Comments
 (0)