Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764205AbYFNA1A (ORCPT ); Fri, 13 Jun 2008 20:27:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762280AbYFNAP0 (ORCPT ); Fri, 13 Jun 2008 20:15:26 -0400 Received: from ns.suse.de ([195.135.220.2]:34623 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758073AbYFNAPY (ORCPT ); Fri, 13 Jun 2008 20:15:24 -0400 Date: Fri, 13 Jun 2008 17:12:14 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Arjan van de Ven Subject: [patch 43/47] serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c Message-ID: <20080614001214.GQ24698@suse.de> References: <20080613234753.235721454@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="serial-fix-enable_irq_wake-disable_irq_wake-imbalance-in-serial_core.c.patch" In-Reply-To: <20080614000840.GA24659@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1853 Lines: 55 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Arjan van de Ven commit 03a74dcc7eebe6edd778317e82fafdf71e68488c in mainline. enable_irq_wake() and disable_irq_wake() need to be balanced. However, serial_core.c calls these for different conditions during the suspend and resume functions... This is causing a regular WARN_ON() as found at http://www.kerneloops.org/search.php?search=set_irq_wake This patch makes the conditions for triggering the _wake enable/disable sequence identical. Signed-off-by: Arjan van de Ven Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- drivers/serial/serial_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2022,6 +2022,8 @@ int uart_suspend_port(struct uart_driver int uart_resume_port(struct uart_driver *drv, struct uart_port *port) { struct uart_state *state = drv->state + port->line; + struct device *tty_dev; + struct uart_match match = {port, drv}; mutex_lock(&state->mutex); @@ -2031,7 +2033,8 @@ int uart_resume_port(struct uart_driver return 0; } - if (!port->suspended) { + tty_dev = device_find_child(port->dev, &match, serial_match_port); + if (!port->suspended && device_may_wakeup(tty_dev)) { disable_irq_wake(port->irq); mutex_unlock(&state->mutex); return 0; -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/