lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1504620621.15310.39.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Tue, 05 Sep 2017 07:10:21 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     netdev@...r.kernel.org, jiri@...nulli.us,
        Chris Mi <chrism@...lanox.com>, xiyou.wangcong@...il.com,
        jhs@...atatu.com, oss-drivers@...ronome.com
Subject: Re: [PATCH net] net: sched: don't use GFP_KERNEL under spin lock

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 <jakub.kicinski@...ronome.com>
> Reviewed-by: Simon Horman <simon.horman@...ronome.com>
> ---
>  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;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ