[alsa-devel] [PATCH 1/2] ALSA: pcm: implement the anonymous dup (inode file descriptor)

Jaroslav Kysela perex at perex.cz
Wed Jan 30 13:19:47 CET 2019


Dne 30.1.2019 v 12:37 Takashi Iwai napsal(a):
> On Wed, 30 Jan 2019 09:47:32 +0100,
> Jaroslav Kysela wrote:
>>
>> This patch implements new SNDRV_PCM_IOCTL_ANONYMOUS_DUP ioctl which
>> returns the new duplicated anonymous inode file descriptor
>> (anon_inode:snd-pcm) which can be passed to the restricted clients.

> +	if (!try_module_get(pcm->card->module)) {
>> +		err = -EFAULT;
> 
> EFAULT doesn't appear to be the best fitting for this error path.

It's in the sync with snd_pcm_open(). This error path should not be
activated in the regular environment anyway (so it's real FAULT somewhere).
If it have to be changed, let change all locations in a separate patch.

Thanks for the review.

					Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list