[PATCH] net: ethernet: fix call_kern.cocci warnings

Linus Walleij linus.walleij at linaro.org
Sun Dec 17 14:47:42 PST 2017


On Sun, Dec 17, 2017 at 7:43 AM, Julia Lawall <julia.lawall at lip6.fr> wrote:

> From: Fengguang Wu <fengguang.wu at intel.com>
>
> Allocation with GFP_KERNEL in code called from the function
> geth_resize_freeq with locks held.
>
> Generated by: scripts/coccinelle/locks/call_kern.cocci
>
> Fixes: 502a2864e5e4 ("net: ethernet: Add a driver for Gemini gigabit ethernet")
> Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
> Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
> ---
>
>  The proposed change of converting the GFP_KERNEL is not necessarily the
>  correct one.  It may be desired to unlock the lock, or to not call the
>  function under the lock in the first place.

It's better to drop the lock around the offending call. the lock was just there
to protect the interrupt registers anyway.

But thanks for finding it!

I have updated the driver patch.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list