Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162266AbWKPCwM (ORCPT ); Wed, 15 Nov 2006 21:52:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1162261AbWKPCv0 (ORCPT ); Wed, 15 Nov 2006 21:51:26 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:7560 "EHLO sous-sol.org") by vger.kernel.org with ESMTP id S1162248AbWKPCrS (ORCPT ); Wed, 15 Nov 2006 21:47:18 -0500 Message-Id: <20061116024839.150127000@sous-sol.org> References: <20061116024332.124753000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Wed, 15 Nov 2006 18:43:58 -0800 From: Chris Wright 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 , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, maks@sternwelten.at, Jiri Slaby Subject: [patch 26/30] Char: isicom, fix close bug Content-Disposition: inline; filename=char-isicom-fix-close-bug.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 45 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Jiri Slaby [PATCH] Char: isicom, fix close bug port is dereferenced even if it is NULL. Dereference it _after_ the check if (!port)... Thanks Eric for reporting this. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7527 Signed-off-by: Jiri Slaby Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright --- drivers/char/isicom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux-2.6.18.2.orig/drivers/char/isicom.c +++ linux-2.6.18.2/drivers/char/isicom.c @@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct static void isicom_close(struct tty_struct *tty, struct file *filp) { struct isi_port *port = tty->driver_data; - struct isi_board *card = port->card; + struct isi_board *card; unsigned long flags; if (!port) return; + card = port->card; if (isicom_paranoia_check(port, tty->name, "isicom_close")) return; -- - 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/