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-next>] [day] [month] [year] [list]
Date:	Tue, 2 Feb 2010 17:01:55 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Greg KH <greg@...ah.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	"Rafael J. Wysocki" <rjw@...k.pl>
Subject: linux-next: manual merge of the driver-core tree with the suspend
 tree

Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
drivers/base/power/main.c between commit
de20f9bde404252647645f9f948c8c5de16cc51d ("PM: Asynchronous suspend and
resume of devices") from the suspend tree and commit
df5a0aec4591ae8a5deb67bc8cb6be3d0812abb2 ("drivers/base: Convert dev->sem
to mutex") from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/base/power/main.c
index 0e26a6f,05848a9..0000000
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@@ -507,11 -476,8 +507,11 @@@ static int device_resume(struct device 
  	TRACE_DEVICE(dev);
  	TRACE_RESUME(0);
  
 +	dpm_wait(dev->parent, async);
- 	down(&dev->sem);
+ 	mutex_lock(&dev->mutex);
  
 +	dev->power.status = DPM_RESUMING;
 +
  	if (dev->bus) {
  		if (dev->bus->pm) {
  			pm_dev_dbg(dev, state, "");
@@@ -543,8 -509,7 +543,8 @@@
  		}
  	}
   End:
- 	up(&dev->sem);
+ 	mutex_unlock(&dev->mutex);
 +	complete_all(&dev->power.completion);
  
  	TRACE_RESUME(error);
  	return error;
@@@ -808,12 -740,8 +808,12 @@@ static int __device_suspend(struct devi
  {
  	int error = 0;
  
 +	dpm_wait_for_children(dev, async);
- 	down(&dev->sem);
+ 	mutex_lock(&dev->mutex);
  
 +	if (async_error)
 +		goto End;
 +
  	if (dev->class) {
  		if (dev->class->pm) {
  			pm_dev_dbg(dev, state, "class ");
@@@ -844,13 -772,8 +844,13 @@@
  			error = legacy_suspend(dev, state, dev->bus->suspend);
  		}
  	}
 +
 +	if (!error)
 +		dev->power.status = DPM_OFF;
 +
   End:
- 	up(&dev->sem);
+ 	mutex_unlock(&dev->mutex);
 +	complete_all(&dev->power.completion);
  
  	return error;
  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ