On Mon, Mar 30, 2020 at 5:06 AM James Bottomley <jejb@xxxxxxxxxxxxxxxxxx> wrote: > > On Sun, 2020-03-29 at 19:53 -0700, Bart Van Assche wrote: > > static unsigned int sr_block_check_events(struct gendisk *disk, > > unsigned int clearing) > > @@ -685,8 +685,9 @@ static const struct block_device_operations > > sr_bdops = > > .owner = THIS_MODULE, > > .open = sr_block_open, > > .release = sr_block_release, > > +#ifndef CONFIG_COMPAT > > .ioctl = sr_block_ioctl, > > -#ifdef CONFIG_COMPAT > > +#else > > .ioctl = sr_block_compat_ioctl, > > Well, this is obviously incorrect: we need the compat ioctl for 32 on > 64 bit and the real for native 64 bit, so both have to be defined. > What you propose would work if we were only ever 32 on 64. I think > what you want to do is change the second .ioctl to .compat_ioctl. The correct fix was merged into v5.6-rc4, see commit 03264ddde245 ("scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places"). Arnd