From: Iyappan Subramanian <isubramanian@apm.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Dean Nelson <dnelson@redhat.com>, Quan Nguyen <qnguyen@apm.com>,
patches <patches@apm.com>
Subject: Re: [PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors
Date: Mon, 28 Aug 2017 10:48:12 -0700 [thread overview]
Message-ID: <CAKh23Fn_oqpsKnSH+OUbQMVvN0oyVSsnbpsHb-c_7obGLjXLSw@mail.gmail.com> (raw)
In-Reply-To: <20170825231034.GC4207@lunn.ch>
Hi Andrew,
On Fri, Aug 25, 2017 at 4:10 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Fri, Aug 25, 2017 at 03:23:30PM -0700, Iyappan Subramanian wrote:
>> When xgene_enet is rmmod'd and there are still outstanding tx descriptors
>> that have been setup but have not completed, it is possible on the next
>> modprobe of the driver to receive the oldest of such tx descriptors. This
>> results in a kernel NULL pointer dereference.
>>
>> This patch attempts to clean up (by tearing down) all outstanding tx
>> descriptors when the xgene_enet driver is being rmmod'd.
>>
>> Given that, on the next modprobe it should be safe to ignore any such tx
>> descriptors received that map to a NULL skb pointer.
>
> This does not sound correct. Before the module is allowed to be
> removed, everything needs to be finished. You need to wait for all the
> tx descriptors to be returned before unloading. How can you free the
> memory for the descriptor if it is still in use? How can you free the
> skbuf the descriptor points to, if it is still in use...
Thanks for pointing out the issue. It is an error, we will fix the issue.
Since the two patches are unrelated, I'm going to post them separately.
Thanks,
Iyappan
>
> Andrew
prev parent reply other threads:[~2017-08-28 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 22:23 [PATCH 0/2] drivers: net: xgene: Misc bug fixes Iyappan Subramanian
2017-08-25 22:23 ` [PATCH 1/2] drivers: net: xgene: Correct probe sequence handling Iyappan Subramanian
2017-08-25 22:23 ` [PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors Iyappan Subramanian
2017-08-25 23:10 ` Andrew Lunn
2017-08-28 17:48 ` Iyappan Subramanian [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:
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=CAKh23Fn_oqpsKnSH+OUbQMVvN0oyVSsnbpsHb-c_7obGLjXLSw@mail.gmail.com \
--to=isubramanian@apm.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dnelson@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=patches@apm.com \
--cc=qnguyen@apm.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).