lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Mar 2014 15:29:45 -0400 (EDT)
From:	David Miller <>
Subject: Re: [PATCH net] xen-netback: disable rogue vif in kthread context

From: Wei Liu <>
Date: Mon, 24 Mar 2014 12:13:34 +0000

> @@ -62,6 +62,13 @@ static int xenvif_poll(struct napi_struct *napi, int budget)
>  	struct xenvif *vif = container_of(napi, struct xenvif, napi);
>  	int work_done;
> +	/* This vif is rogue, we pretend we've used up all budget to
> +	 * deschedule it from NAPI. But this interface will be turned
> +	 * off in thread context later.
> +	 */
> +	if (unlikely(vif->disabled))
> +		return budget;
> +

As mentioned by others, this makes NAPI poll forever.

The following comment was referenced:

		/* Drivers must not modify the NAPI state if they
		 * consume the entire weight.  In such cases this code
		 * still "owns" the NAPI instance and therefore can
		 * move the instance around on the list at-will.
		if (unlikely(work == weight)) {

WHICH MEANS, if you return that you used the full budget, the NAPI instance
is still owned by the core.

Why?  Becuase if you used the entire budget, it's going to put you back onto
the polling list and invoke you again some time soon.

If the interface is disabled, you should return zero from the poll and do a
NAPI completion.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists