[alsa-devel] [PATCH] ALSA: core: fix 64-bit SNDRV_PCM_IOCTL_STATUS ABI breakage

Clemens Ladisch clemens at ladisch.de
Sun Oct 28 11:45:35 CET 2012


Takashi Iwai wrote:
> Clemens Ladisch wrote:
>> Commit 4eeaaeaea (ALSA: core: add hooks for audio timestamps) added the
>> new audio_tstamp field to struct snd_pcm_status.  However, struct
>> timespec requires 64-bit alignment, so the 64-bit compiler would insert
>> 32 bits of padding before this field, which broke SNDRV_PCM_IOCTL_STATUS
>> with error messages like this:
>>
>>   kernel: unknown ioctl = 0x80984120
>>
>> To solve this, insert the padding explicitly so that it can be taken
>> into account when calculating the ABI structure size.
>>
>> Signed-off-by: Clemens Ladisch <clemens at ladisch.de>
>
> Oops, that's bad.  Thanks for catching this.
> I applied it now to for-next branch.
>
> Could you fix alsa-lib code as well?

Oops; done.


Regards,
Clemens


More information about the Alsa-devel mailing list