Skip to content
Commit dac7c08f authored by Parav Pandit's avatar Parav Pandit Committed by David S. Miller
Browse files

devlink: Fix list access without lock while reading region



While finding the devlink device during region reading,
devlink device list is accessed and devlink device is
returned without holding a lock. This could lead to use-after-free
accesses.

While at it, add lockdep assert to ensure that all future callers hold
the lock when calling devlink_get_from_attrs().

Fixes: 4e54795a ("devlink: Add support for region snapshot read command")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fdd41ec2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment