Re: [B.A.T.M.A.N.] [PATCH 01/10] batman-adv: fix soft-interface MTU computation

Antonio Quartulli
2014-02-18T06:44:53Z

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

On 17/02/14 22:13, David Miller wrote:
> From: Antonio Quartulli <antonio@meshcoding.com>
> Date: Mon, 17 Feb 2014 21:48:40 +0100
>
>> + atomic_set(&bat_priv->packet_size_max, min_mtu);
>
> Please fix this.
>
> The only operations performed on packet_size_max are 'set' and
> 'read'. This is not what one uses atomic_t's for.
>
> The use of an atomic_t in this context is a NOP. You aren't
> getting any kind of synchronization at all.

True. Thanks for the suggestion.
Unfortunately this is not the only "fake-atomic" variable we have.

We'll send a change for this later within our pull request for net-next, ok?

--
Antonio Quartulli

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]