[patch 24/45] cdrom: fix bad cgc.buflen assignment

Greg KH
2006-07-17T16:34:45Z

[-- Attachment #1: cdrom-fix-bad-cgc.buflen-assignment.patch --]
[-- Type: text/plain, Size: 868 bytes --]

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Jens Axboe <axboe@suse.de>

The code really means to mask off the high bits, not assign 0xff.

Signed-off-by: Jens Axboe <axboe@suse.de>
Cc: Marcus Meissner <meissner@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/cdrom/cdrom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.17.4.orig/drivers/cdrom/cdrom.c
+++ linux-2.6.17.4/drivers/cdrom/cdrom.c
@@ -1838,7 +1838,7 @@ static int dvd_read_bca(struct cdrom_dev
init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
cgc.cmd[0] = GPCMD_READ_DVD_STRUCTURE;
cgc.cmd[7] = s->type;
- cgc.cmd[9] = cgc.buflen = 0xff;
+ cgc.cmd[9] = cgc.buflen & 0xff;

if ((ret = cdo->generic_packet(cdi, &cgc)))
return ret;

--