netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: o.freyermuth@googlemail.com
Cc: romieu@fr.zoreil.com, netdev@vger.kernel.org
Subject: Re: Memory corruption with r8169 across several device revisions and kernels
Date: Tue, 23 Jan 2018 20:33:16 -0500 (EST)	[thread overview]
Message-ID: <20180123.203316.1537241370565274071.davem@davemloft.net> (raw)
In-Reply-To: <cf56c590-72aa-8a6a-f1e9-02262ba6354a@googlemail.com>

From: Oliver Freyermuth <o.freyermuth@googlemail.com>
Date: Wed, 24 Jan 2018 02:21:55 +0100

> Am 23.01.2018 um 23:13 schrieb Francois Romieu:
>> 
>> It helps. Can you try the snippet below ?
> 
> It seems to fix the issue - I could not reproduce memory corruption
> anymore neither on an Ubuntu 17.10.1 live system (with patched
> kernel module) nor on my Gentoo system (4.14.12 with your patch
> applied) across several reboots and module reloads!

Thanks for helping test this out.

> Sorry for my ignorance, but I'm curious - the R32 is there to avoid
> reordering of the writes?

The R32 make sure the write(s) beforehand have reached the chip, and
indeed another thing it ensures is write ordering.

> Many thanks for the quick help. I don't know the policies, but from
> user point of view, this should be a good candidate for backporting
> to stable kernels, since many systems in the wild should be affected
> by this, and spurious memory corruption leading to e.g. broken
> filesystems is rather nasty.

Hopefully Francois can post a bonafide patch for me to apply with
a full commit log message etc.

I'm really surprised we were clearing those registers after
programming properly, I wonder what that was all about. :-/

Thanks again for your testing and help.

  reply	other threads:[~2018-01-24  1:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-20 20:18 Memory corruption with r8169 across several device revisions and kernels Oliver Freyermuth
2018-01-21 20:48 ` Francois Romieu
2018-01-21 20:50   ` Oliver Freyermuth
2018-01-22  0:09     ` Francois Romieu
2018-01-22  0:44       ` Oliver Freyermuth
2018-01-22 22:55       ` Oliver Freyermuth
2018-01-23 15:28         ` David Miller
2018-01-23 15:47           ` Oliver Freyermuth
2018-01-24  5:31             ` Andreas Hartmann
2018-01-24  7:05               ` Andreas Hartmann
2018-01-23 22:13         ` Francois Romieu
2018-01-24  1:21           ` Oliver Freyermuth
2018-01-24  1:33             ` David Miller [this message]
2018-01-26  0:53               ` [PATCH net 1/1] r8169: fix memory corruption on retrieval of hardware statistics Francois Romieu
2018-01-26  2:34                 ` David Miller

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20180123.203316.1537241370565274071.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=o.freyermuth@googlemail.com \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).