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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 21 Nov 2018 10:05:57 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Davide Caratti <dcaratti@...hat.com>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Ivan Vecera <ivecera@...hat.com>
Subject: Re: [PATCH net v2] net/sched: act_police: fix race condition on state variables

On Tue, Nov 20, 2018 at 1:19 PM Davide Caratti <dcaratti@...hat.com> wrote:
> @@ -257,25 +261,28 @@ static int tcf_police_act(struct sk_buff *skb, const struct tc_action *a,
>                 }
>
>                 now = ktime_get_ns();
> -               toks = min_t(s64, now - p->tcfp_t_c, p->tcfp_burst);
> +               spin_lock_bh(&police->tcfp_lock);
> +               toks = min_t(s64, now - police->tcfp_t_c, p->tcfp_burst);


I don't think you need to disable BH here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ