Re: [PATCH v2 2/5] net: qrtr: Implement outgoing flow control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
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.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux