Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762106AbZFIKbA (ORCPT ); Tue, 9 Jun 2009 06:31:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932090AbZFIKUn (ORCPT ); Tue, 9 Jun 2009 06:20:43 -0400 Received: from kroah.org ([198.145.64.141]:55208 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbZFIKUm (ORCPT ); Tue, 9 Jun 2009 06:20:42 -0400 X-Mailbox-Line: From greg@blue.kroah.org Tue Jun 9 02:41:05 2009 Message-Id: <20090609094105.427022347@blue.kroah.org> User-Agent: quilt/0.48-1 Date: Tue, 09 Jun 2009 02:39:45 -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 , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Tejun Heo , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman Subject: [patch 57/87] ide-tape: remove back-to-back REQUEST_SENSE detection References: <20090609093848.204935043@blue.kroah.org> Content-Disposition: inline; filename=ide-tape-remove-back-to-back-request_sense-detection.patch In-Reply-To: <20090609094451.GA26439@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 36 2.6.29-stable review patch. If anyone has any objections, please let us know. ------------------ From: Tejun Heo commit 36999a5af1b6c5379e59f0ddf434db08d03c19e4 upstream. Impact: fix an oops which always triggers ide_tape_issue_pc() assumed drive->pc isn't NULL on invocation when checking for back-to-back request sense issues but drive->pc can be NULL and even when it's not NULL, it's not safe to dereference it once the previous command is complete because pc could have been freed or was on stack. Kill back-to-back REQUEST_SENSE detection. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/ide/ide-tape.c | 6 ------ 1 file changed, 6 deletions(-) --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -654,12 +654,6 @@ static ide_startstop_t idetape_issue_pc( { idetape_tape_t *tape = drive->driver_data; - if (drive->pc->c[0] == REQUEST_SENSE && - pc->c[0] == REQUEST_SENSE) { - printk(KERN_ERR "ide-tape: possible ide-tape.c bug - " - "Two request sense in serial were issued\n"); - } - if (tape->failed_pc == NULL && pc->c[0] != REQUEST_SENSE) tape->failed_pc = pc; -- 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/