[Linux-kernel-mentees] [PATCH] net: core: devlink.c: Hold devlink->lock from the beginning of devlink_dpipe_table_register()

Jiri Pirko jiri at resnulli.us
Sun Feb 23 18:17:46 UTC 2020


Sun, Feb 23, 2020 at 12:22:33PM CET, madhuparnabhowmik10 at gmail.com wrote:
>From: Madhuparna Bhowmik <madhuparnabhowmik10 at gmail.com>
>
>devlink_dpipe_table_find() should be called under either
>rcu_read_lock() or devlink->lock. devlink_dpipe_table_register()
>calls devlink_dpipe_table_find() without holding the lock
>and acquires it later. Therefore hold the devlink->lock
>from the beginning of devlink_dpipe_table_register().
>
>Suggested-by: Jiri Pirko <jiri at mellanox.com>
>Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10 at gmail.com>

Reviewed-by: Jiri Pirko <jiri at mellanox.com>


More information about the Linux-kernel-mentees mailing list