lkml.org 
[lkml]   [1996]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectA minor bug in sr_ioctl.c for 2.1.13?
Date

Whenever I mount a cdrom with 2.1.13 I get this message:

DEBUG: sr_audio: result for ioctl 5305: fffffff2

which is saying that the code for CDROMREADTOCHDR returned
-EFAULT.

This is coming from the sr_audio_ioctl function in sr_ioctl.c
where it says:

if (copy_to_user(...))
return -EFAULT;

Shouldn't this be
if (!copy_to_user(...))

If I'm right, here's a simple patch.

==================
--- sr_ioctl.c.orig Sat Nov 23 16:51:25 1996
+++ sr_ioctl.c Mon Nov 25 14:19:24 1996
@@ -339,7 +339,7 @@

scsi_free(buffer, 512);

- if (copy_to_user ((void *) arg, &tochdr, sizeof (struct cdrom_tochdr)))
+ if (!copy_to_user ((void *) arg, &tochdr, sizeof (struct cdrom_tochdr)))
result = -EFAULT;
break;
}
==================

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.033 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site