lkml.org 
[lkml]   [2022]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net 1/2] net: ipa: fix atomic update in ipa_endpoint_replenish()
On Tue, Jan 11, 2022 at 01:21:49PM -0600, Alex Elder wrote:
> In ipa_endpoint_replenish(), if an error occurs when attempting to
> replenish a receive buffer, we just quit and try again later. In
> that case we increment the backlog count to reflect that the attempt
> was unsuccessful. Then, if the add_one flag was true we increment
> the backlog again.
>
> This second increment is not included in the backlog local variable
> though, and its value determines whether delayed work should be
> scheduled. This is a bug.
>
> Fix this by determining whether 1 or 2 should be added to the
> backlog before adding it in a atomic_add_return() call.
>
> Fixes: 84f9bd12d46db ("soc: qcom: ipa: IPA endpoints")
> Signed-off-by: Alex Elder <elder@linaro.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

\
 
 \ /
  Last update: 2022-01-11 21:07    [W:0.072 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site