• Takashi Iwai's avatar
    ALSA: Fix compat_ioctl handling for OSS emulations · 83266b6b
    Takashi Iwai authored
    The ALSA PCM, mixer and sequencer OSS emulations provide the 32bit
    compatible ioctl, but they just call the 64bit native ioctl as is.
    Although this works in most cases, passing the argument value as-is
    isn't guaranteed to work on all architectures.  We need to convert it
    via compat_ptr() instead.
    
    This patch addresses the missing conversions.  Since all relevant
    ioctls in these functions take the argument as a pointer, we do the
    pointer conversion in each compat_ioctl and pass it as a 64bit value
    to the native ioctl.
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    83266b6b
pcm_oss.c 85.1 KB