Subject: Re: [RFC PATCH 2/2] l2tp: Introduce L2TPv3 IP encapsulation support for IPv6

From: James Chapman <[email-masked]>
Date: Tue, 17 Apr 2012 15:01:54 +0100

On 17/04/12 13:48, Eric Dumazet wrote:
> On Tue, 2012-04-17 at 13:29 +0100, James Chapman wrote:
>> L2TPv3 defines an IP encapsulation packet format where data is carried
>> directly over IP (no UDP). The kernel already has support for L2TP IP
>> encapsulation over IPv4 (l2tp_ip). This patch introduces support for L2TP
>> IP encapsulation over IPv6.
> 
> ...
>
>> +	/* Update stats */
>> +	if (err < 0) {
>> +		lsk->tx_errors++;
>> +	} else {
>> +		lsk->tx_packets++;
> 
> This is not SMP (especially on 32bit) safe, you dont own any lock

Thanks for catching this. This should be updating the stats in the l2tp
tunnel, not private data of the socket. We have the same SMP issues in
the l2tp tunnel/session stats code though. I'll submit a separate patch
to fix it.

Thanks for reviewing.

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development