linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pdurrant@amazon.com
Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-kernel@vger.kernel.org, jgross@suse.com,
	jakub.kicinski@netronome.com, wei.liu@kernel.org
Subject: Re: [PATCH net] xen-netback: avoid race that can lead to NULL pointer dereference
Date: Thu, 12 Dec 2019 11:00:19 -0800 (PST)	[thread overview]
Message-ID: <20191212.110019.462290546870002203.davem@davemloft.net> (raw)
In-Reply-To: <20191212123723.21548-1-pdurrant@amazon.com>

From: Paul Durrant <pdurrant@amazon.com>
Date: Thu, 12 Dec 2019 12:37:23 +0000

> Commit 2ac061ce97f4 ("xen/netback: cleanup init and deinit code")
> introduced a problem. 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.
> 
> Signed-off-by: Paul Durrant <pdurrant@amazon.com>

Please repost this with an appropriate Fixes: tag.

And then you can removed the explicit commit reference from the log message
and simply say "The commit mentioned in the Fixes tag introduced a problen ..."

      parent reply	other threads:[~2019-12-12 19:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 12:37 [PATCH net] xen-netback: avoid race that can lead to NULL pointer dereference Paul Durrant
2019-12-12 18:10 ` Wei Liu
2019-12-12 19:00 ` David Miller [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=20191212.110019.462290546870002203.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --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;
as well as URLs for NNTP newsgroup(s).