From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Paul Durrant <pdurrant@amazon.com>
Cc: <xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Juergen Gross <jgross@suse.com>,
Wei Liu <wei.liu@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net v2] xen-netback: avoid race that can lead to NULL pointer dereference
Date: Sun, 15 Dec 2019 11:41:39 -0800 [thread overview]
Message-ID: <20191215114139.34f0d24e@cakuba.netronome.com> (raw)
In-Reply-To: <20191213132040.21446-1-pdurrant@amazon.com>
On Fri, 13 Dec 2019 13:20:40 +0000, Paul Durrant wrote:
> In function xenvif_disconnect_queue(), the value of queue->rx_irq is
> zeroed *before* queue->task is stopped. Unfortunately that task may call
> notify_remote_via_irq(queue->rx_irq) and calling that function with a
> zero value results in a NULL pointer dereference in evtchn_from_irq().
>
> This patch simply re-orders things, stopping all tasks before zero-ing the
> irq values, thereby avoiding the possibility of the race.
>
> Fixes: 2ac061ce97f4 ("xen/netback: cleanup init and deinit code")
> Signed-off-by: Paul Durrant <pdurrant@amazon.com>
> v2:
> - Add 'Fixes' tag and re-work commit comment
I've added Wei's Ack from v1, if the code doesn't change substantially
please keep people's Acks.
Applied, thanks.
prev parent reply other threads:[~2019-12-15 19:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 13:20 Paul Durrant
2019-12-15 19:41 ` Jakub Kicinski [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=20191215114139.34f0d24e@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pdurrant@amazon.com \
--cc=wei.liu@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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
all inboxes | Powered by JetHome®