lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <523C5BA7.2010500@citrix.com>
Date:	Fri, 20 Sep 2013 15:28:55 +0100
From:	David Vrabel <david.vrabel@...rix.com>
To:	Wei Liu <wei.liu2@...rix.com>
CC:	Paul Durrant <paul.durrant@...rix.com>, <netdev@...r.kernel.org>,
	<xen-devel@...ts.xen.org>, Ian Campbell <ian.campbell@...rix.com>
Subject: Re: [PATCH net-next 1/2] xen-netback: add a vif-is-connected flag

On 20/09/13 14:31, Wei Liu wrote:
> On Fri, Sep 20, 2013 at 01:56:30PM +0100, Paul Durrant wrote:
>> Having applied my patch to separate vif disconnect and free, I ran into a
>> BUG when testing resume from S3 with a Windows frontend because the vif task
>> pointer was not cleared by xenvif_disconnect() and so a double call to this
>> function tries to stop the thread twice.
>> Rather than applying a point fix for that issue it seems better to introduce
>> a boolean to indicate whether the vif is connected or not such that repeated
>> calls to either xenvif_connect() or xenvif_disconnect() behave appropriately.

We already have a backend state of CONNECTED/CLOSED/etc. why do we need
an additional bit of state outside of this?

Does something like this in frontend_changed() fix it?

	case XenbusStateClosing:
                switch (dev->state) {
                case XenbusStateClosed;
                	break;
		case XenbusStateConnected:
			disconnect_backend(dev);
			/* fall through */
		default:
			xenbus_switch_state(dev, XenbusStateClosing);
			break;
		}
		break;

	case XenbusStateClosed:
                switch (dev->state) {
                case XenbusStateConnected;
			disconnect_backend(dev);
                	/* fall through */
		default:
			xenbus_switch_state(dev, XenbusStateClosed);
			break;
		}
		if (xenbus_dev_is_online(dev))
			break;
		/* fall through if not online */

Can you also remove destroy_backend()?  It's not needed any more.

I'd also recommend waiting a bit for other review feedback before
posting an updated series.

David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ