[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bde101fd-2bd1-ddc8-ebeb-4145963e95d1@gmail.com>
Date: Tue, 8 May 2018 14:47:38 +0800
From: Jia-Ju Bai <baijiaju1990@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>, davem@...emloft.net,
fthain@...egraphics.com.au, joe@...ches.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: 8390: Fix possible data races in __ei_get_stats
On 2018/5/8 13:04, Eric Dumazet wrote:
>
> On 05/07/2018 07:16 PM, Jia-Ju Bai wrote:
>
>> Yes, "&dev->stats" will not change, because it is a fixed address.
>> But the field data in "dev->stats" is changed (rx_frame_errors, rx_crc_errors and rx_missed_errors).
>> So if the driver returns "&dev->stats" without lock protection (like on line 858), the field data value of this return value can be the changed field data value or unchanged field data value.
>
> We do not care.
>
> This function can be called by multiple cpus at the same time.
>
> As soon as one cpu returns from it, another cpu can happily modify dev->stats.ANYFIELD.
>
> Your patch fixes nothing at all.
>
Okay, thanks.
I also find that my patch does not work...
Best wishes,
Jia-Ju Bai
Powered by blists - more mailing lists