All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: <netdev@vger.kernel.org>, <xen-devel@lists.xen.org>,
	<zoltan.kiss@citrix.com>, <edwin@etorok.net>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH v4 net] xen-netback: disable rogue vif in kthread context
Date: Tue, 1 Apr 2014 13:10:46 +0100	[thread overview]
Message-ID: <533AACC6.3050200@citrix.com> (raw)
In-Reply-To: <1396352772-7884-1-git-send-email-wei.liu2@citrix.com>

On 01/04/14 12:46, Wei Liu wrote:
> When netback discovers frontend is sending malformed packet it will
> disables the interface which serves that frontend.
> 
> However disabling a network interface involving taking a mutex which
> cannot be done in softirq context, so we need to defer this process to
> kthread context.
> 
> This patch does the following:
> 1. introduce a flag to indicate the interface is disabled.
> 2. check that flag in TX path, don't do any work if it's true.
> 3. check that flag in RX path, turn off that interface if it's true.
> 
> The reason to disable it in RX path is because RX uses kthread. After
> this change the behavior of netback is still consistent -- it won't do
> any TX work for a rogue frontend, and the interface will be eventually
> turned off.
> 
> Also change a "continue" to "break" after xenvif_fatal_tx_err, as it
> doesn't make sense to continue processing packets if frontend is rogue.
> 
> This is a fix for XSA-90.

Reviewed-by: David Vrabel <david.vrabel@citrix.com>

David

  reply	other threads:[~2014-04-01 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 11:46 [PATCH v4 net] xen-netback: disable rogue vif in kthread context Wei Liu
2014-04-01 12:10 ` David Vrabel [this message]
2014-04-01 12:19   ` Ian Campbell
2014-04-01 12:19   ` Ian Campbell
2014-04-01 12:10 ` David Vrabel
2014-04-01 20:27 ` David Miller
2014-04-02  9:05   ` Ian Campbell
2014-04-02 10:21     ` Wei Liu
2014-04-02 10:21     ` Wei Liu
2014-04-01 20:27 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-04-01 11:46 Wei Liu

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=533AACC6.3050200@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=edwin@etorok.net \
    --cc=ian.campbell@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=zoltan.kiss@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.