On Tue, 2017-09-05 at 03:54 -0700, Jakub Kicinski wrote:
> The new TC IDR code uses GFP_KERNEL under spinlocks. Which leads
> to:
> ...
>
> Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use
> IDR")
> Signed-off-by: Jakub Kicinski <[email protected]>
> Reviewed-by: Simon Horman <[email protected]>
> ---
> net/sched/act_api.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index 0eb545bcb247..a48e4b45722d 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -298,7 +298,7 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index,
> struct nlattr *est,
> if (!index) {
idr_preload(GFP_KERNEL);
> spin_lock_bh(&idrinfo->lock);
> err = idr_alloc_ext(idr, NULL, &idr_index, 1, 0,
> - GFP_KERNEL);
> + GFP_ATOMIC);
> spin_unlock_bh(&idrinfo->lock);
> if (err) {
> err3:
> @@ -309,7 +309,7 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index,
> struct nlattr *est,
> } else {
idr_preload(GFP_KERNEL);
> spin_lock_bh(&idrinfo->lock);
> err = idr_alloc_ext(idr, NULL, NULL, index, index + 1,
> - GFP_KERNEL);
> + GFP_ATOMIC);
> spin_unlock_bh(&idrinfo->lock);
> if (err)
> goto err3;