Re: [PATCH for-4.2] IB/mlx4: Fix and optimize SRIOV slave init

Or Gerlitz
2015-07-09T08:28:51Z

On 7/9/2015 1:30 AM, Doug Ledford wrote:
> In mlx4_main.c:do_slave_init(), the function is supposed to queue up
> each work struct. However, it checks to make sure the sriov support
> isn't going down first. When it is going down, it doesn't queue up the
> work struct, which results in us leaking the work struct at the end of
> the function. As a fix, make sure that if we don't queue up the work
> struct, then we kfree it instead.
>
> The routine was also sub-optimal in its loop operations. Instead of
> taking and releasing a spin lock over and over again, let's just take it
> once, and quickly loop through what needs to be done under the spin lock
> and then release it.
>

Hi Doug,

I'd like Jack to review this before we ack, not sure if he's in today,
so he might get to look on that only on Sunday.

Or.