ide-cd: fix leftover data BUG

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, February 1, 2008 - 4:03 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f4f6c...
Commit:     4f4f6c2502474f51654a699d7127d86c2f87075a
Parent:     4eb166d9874b4917d79ccd14577a60d795a0cb4a
Author:     Jens Axboe <jens.axboe@oracle.com>
AuthorDate: Thu Jan 31 13:57:51 2008 +0100
Committer:  Jens Axboe <jens.axboe@oracle.com>
CommitDate: Fri Feb 1 09:26:33 2008 +0100

    ide-cd: fix leftover data BUG
    
    It's perfectly legal to have data leftovers when a drive signals
    completion, it happens all the time when a user issues a command
    with a transfer count that is too large.
    
    Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---
 drivers/ide/ide-cd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 74c6087..bee05a3 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1722,7 +1722,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
 	 */
 	if ((stat & DRQ_STAT) == 0) {
 		spin_lock_irqsave(&ide_lock, flags);
-		if (__blk_end_request(rq, 0, 0))
+		if (__blk_end_request(rq, 0, rq->data_len))
 			BUG();
 		HWGROUP(drive)->rq = NULL;
 		spin_unlock_irqrestore(&ide_lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide-cd: fix leftover data BUG, Linux Kernel Mailing ..., (Fri Feb 1, 4:03 am)