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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Sep 2019 19:44:03 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Haiyang Zhang <haiyangz@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: RE: [PATCH][PATCH net-next] hv_netvsc: Add the support of hibernation

> From: Haiyang Zhang <haiyangz@...rosoft.com>
> Sent: Thursday, September 12, 2019 6:50 AM
> > -----Original Message-----
> > From: Dexuan Cui <decui@...rosoft.com>
> > Sent: Wednesday, September 11, 2019 7:38 PM

> > +static int netvsc_suspend(struct hv_device *dev)
> > +{
> > +	struct net_device_context *ndev_ctx;
> > +	struct net_device *vf_netdev, *net;
> > +	struct netvsc_device *nvdev;
> > +	int ret;
> > +
> > +	net = hv_get_drvdata(dev);
> > +
> > +	ndev_ctx = netdev_priv(net);
> > +	cancel_delayed_work_sync(&ndev_ctx->dwork);
> > +
> > +	rtnl_lock();
> > +
> > +	nvdev = rtnl_dereference(ndev_ctx->nvdev);
> > +	if (nvdev == NULL) {
> > +		ret = -ENODEV;
> > +		goto out;
> > +	}
> > +
> > +	cancel_work_sync(&nvdev->subchan_work);
> 
> This looks redundant because netvsc_detach() cancels subchan_work.
> - Haiyang

You are right. I'll remove the superflous line 
cancel_work_sync(&nvdev->subchan_work);
in netvsc_suspend() in v2.

I'll wait for a few days before posting v2, in case people may have
other comments.

Thanks,
-- Dexuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ