On Thu, 07 May 2026 23:49:46 +0800, Ren Wei <[email protected]> wrote:
> diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
> index 2e42f6b348c8..4c582443f67c 100644
> --- a/net/batman-adv/tp_meter.c
> +++ b/net/batman-adv/tp_meter.c
> @@ -435,7 +435,7 @@ static void batadv_tp_sender_end(struct batadv_priv 
> *bat_priv,
>  static void batadv_tp_sender_shutdown(struct batadv_tp_vars *tp_vars,
>                                     enum batadv_tp_meter_reason reason)
>  {
> -     if (!atomic_dec_and_test(&tp_vars->sending))
> +     if (atomic_xchg(&tp_vars->sending, 0) != 1)
>               return;
>  
>       tp_vars->reason = reason;

What about:


        /* ensure nobody else tries to stop the thread now */
        if (atomic_dec_and_test(&tp_vars->sending))
                tp_vars->reason = err;
        break;


in batadv_tp_send()? If shutdown is called and then batadv_tp_send reaches
this part, isn't this also ending up at -1?

Regarding the netdev mail situation: Please don't send it to
[email protected] directly - they want us to first handle it internally
before forwarding it later to netdev. This should reduce the patch volume for
them. There is already a change to the MAINTAINERS file to remove the
batman-adv paths from the NETWORKING section (netdev@....) queued up
- but it was not yet forwarded to net-next (and I am just wondering whether I
should ask Simon to directly submit it to net).

Regards,
        Sven

-- 
Sven Eckelmann <[email protected]>

Reply via email to