[Bug 531] New: cdrom ioctl CDROM_SEND_PACKET broken

Martin J. Bligh (mbligh@aracnet.com)
Wed, 02 Apr 2003 08:50:07 -0800


http://bugme.osdl.org/show_bug.cgi?id=531

Summary: cdrom ioctl CDROM_SEND_PACKET broken
Kernel Version: 2.5.66+
Status: NEW
Severity: normal
Owner: bugme-janitors@lists.osdl.org
Submitter: pee@erkkila.org

Distribution: gentoo/other
Hardware Environment: amd/asus p4/intel
Software Environment:
Problem Description:

I think i've located the problem with doing generic commands
to atapi drives.

mmc_ioctl calls cdrom_do_cmd with it's own copy of cgc made
from IOCTL_IN

cdrom_do_cmd then does it's thing, and copies back into
the cgc from mmc_ioctl. And then returns, however mmc_ioctl
is returning immediatly w/o updating the user passed in cgc.

The pointers to return to user space never get updated, so if you
set all 1's in a cgc->buffer and send it in you will get all 1's back
as that buffer is not updated correctly. nor is the sense data.

It looks like the copy_to_user needs to move to mmc_ioctl, or mmc_ioctl
needs to update the user cgc correctly.

Steps to reproduce:

Run a small program that calls CDROM_SEND_PACKET, i'll attach one

-
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/