Re: [PATCH] net: core: devlink.c: Hold devlink->lock from the beginning of devlink_dpipe_table_register()
From: Jiri Pirko
Date: Sun Feb 23 2020 - 13:18:28 EST
Sun, Feb 23, 2020 at 12:22:33PM CET, madhuparnabhowmik10@xxxxxxxxx wrote:
>From: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
>
>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@xxxxxxxxxxxx>
>Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxxxx>