From: Eric Dumazet <[email protected]> Date: Mon, 13 Jun 2016 07:50:25 -0700
> From: Eric Dumazet <[email protected]> > > Maciej Żenczykowski reported lockdep warning a spinlock > was not registered before being held in mlx4_cmd_wake_completions() > > cmd.context_lock initialization is not at the right place. > > 1) mlx4_cmd_use_events() can be called multiple times. > Calling spin_lock_init() on a live spinlock can lead > to hangs. > > 2) mlx4_cmd_wake_completions() can be called while lock > has not been initialized. > Lockdep complains, and current logic is not race prone. > > It seems better to move the initialization earlier in > mlx4_load_one() > > Signed-off-by: Eric Dumazet <[email protected]> > Reported-by: Maciej Żenczykowski <[email protected]> Applied.
