Skip to contentSkip to conversation

compat_ioctl: fix block device compat ioctl regression

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 27, 2007 3 messages not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 1/1 compat_ioctl: fix block device compat ioctl regression

From: Philip Langdale <[email protected]>
The conversion of handlers to compat_blkdev_ioctl accidentally disabled handling of most ioctl numbers on block devices because of a typo. Fix the one line to enable it all again.

---

Mea Culpa. This should have been found by my testing, as it's clear that most of my big patch never worked at all. Sorry for causing problems for everyone involved here.

I'm attributing the patch to Philip, as he's the one who pointed out to me what the fix is.

	Arnd <><
block/compat_ioctl.c +1 -1
@@ -581,7 +581,7 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
 {
 	int ret;
 
-	switch (arg) {
+	switch (cmd) {
 	case HDIO_GET_UNMASKINTR:
 	case HDIO_GET_MULTCOUNT:
 	case HDIO_GET_KEEPSETTINGS:
#4 lore raw
Quoted 6 lines · Arnd Bergmann

From: Philip Langdale <[email protected]>
The conversion of handlers to compat_blkdev_ioctl accidentally disabled handling of most ioctl numbers on block devices because of a typo. Fix the one line to enable it all again.

Quoted 8 lines

---

Mea Culpa. This should have been found by my testing, as it's clear that most of my big patch never worked at all. Sorry for causing problems for everyone involved here.

I'm attributing the patch to Philip, as he's the one who pointed out to me what the fix is.

Oops, added for swift inclusion.

Signature · 1 line
Jens Axboe