Re: ioctl seems to change errno behaviour in 5.6.0rc2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-02-20 11:02 a.m., Antonio Larrosa wrote:
Hello,

I noticed cdparanoia stopped working with kernel 5.6.0rc2 while it worked fine
with 5.5.2 .

Running as root `cdparanoia -v -d /dev/sr0 [0]` with 5.6.0rc2, gives the
following errors:

Testing /dev/sr0 for SCSI/MMC interface
         no SG_IO support for device: /dev/sr0
Error trying to open /dev/sga exclusively (No such file or directory).

I checked that the sg module is loaded with both kernels and also did a diff of
the lsmod output with both kernels and didn't find anything suspicious.

After some tests, I did a small c application using code from cdparanoia where
it can be seen that the ioctl(fd, SG_IO, &hdr) call returns EINVAL in errno with
the 5.5.2 kernel but returns EFAULT with 5.6.0rc2 .

The code is attached and can be built just with `gcc test.c -o test` (note it's
hardcoded in main to use /dev/sr0, so it doesn't have any parameter).

Note that I'm not a cdparanoia developer (in fact, it seems to have been
unmaintained for many years), but I thought it might be interesting to report an
ioctl that changes the behaviour in different kernels.

Antonio,
A fix is in the works for this, see:
[PATCH] compat_ioctl, cdrom: Replace .ioctl with .compat_ioctl in four appropriate places

by Arnd Bergmann on the linux-scsi list.

Doug Gilbert





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux