LKML Archive on
help / color / mirror / Atom feed
From: Jia-Ju Bai <>
To: Eric Dumazet <>,,,
Subject: Re: [PATCH] net: 8390: Fix possible data races in __ei_get_stats
Date: Tue, 8 May 2018 14:47:38 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

      reply	other threads:[~2018-05-08  6:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 14:08 Jia-Ju Bai
2018-05-07 14:15 ` Eric Dumazet
2018-05-08  0:51   ` Jia-Ju Bai
2018-05-08  1:56     ` Eric Dumazet
2018-05-08  2:16       ` Jia-Ju Bai
2018-05-08  5:04         ` Eric Dumazet
2018-05-08  6:47           ` Jia-Ju Bai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] net: 8390: Fix possible data races in __ei_get_stats' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).