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]
Message-Id: <20190531.144635.1962054387021988238.davem@davemloft.net>
Date:   Fri, 31 May 2019 14:46:35 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     bjorn.andersson@...aro.org
Cc:     aneela@...eaurora.org, clew@...eaurora.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2 2/5] net: qrtr: Implement outgoing flow control

From: Bjorn Andersson <bjorn.andersson@...aro.org>
Date: Thu, 30 May 2019 18:17:50 -0700

> +	flow = radix_tree_lookup(&node->qrtr_tx_flow, key);
> +	if (flow)
> +		atomic_set(&flow->pending, 0);

You can't just zero out an atomic counter without extra synchronization
which protects you from the increment paths.

And since you'll need a lock to cover all of those paths, you don't
need to use an atomic_t and instead can use a plain integer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ