The memset looks wrong:
- memset(buf, 0, sizeof (buf));
+ if ((buf = (u_char *) kmalloc(2060, GFP_KERNEL)) == NULL)
+ return -ENOMEM;
+
+ memset(buf, 0, sizeof(buf));
^^^^^^^^^^^
init_cdrom_command(&cgc, buf, sizeof(buf));
I doubt you want to initialize the first 4 bytes...
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/