Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] pktcdvd: Correctly set cmd_len field in pkt_generic_packet

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7810 - a silly
copy-paste bug introduced by the latest change.

Signed-off-by: Gerhard Dirschl <gd@spherenet.de>
Cc: Peter Osterlund <petero2@telia.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Gerhard Dirschl and committed by
Linus Torvalds
91e4ee38 1df49008

+1 -1
+1 -1
drivers/block/pktcdvd.c
··· 765 765 goto out; 766 766 } 767 767 768 - rq->cmd_len = COMMAND_SIZE(rq->cmd[0]); 768 + rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]); 769 769 memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE); 770 770 if (sizeof(rq->cmd) > CDROM_PACKET_SIZE) 771 771 memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);