From: Jaroslav Kysela Subject: Re: [PATCH 1/2] ALSA: pcm: implement the anonymous dup (inode file descriptor) Date: Wed, 30 Jan 2019 13:19:47 +0100 Message-ID: References: <20190130084733.979-1-perex@perex.cz> <20190130084733.979-2-perex@perex.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) by alsa0.perex.cz (Postfix) with ESMTP id D3065267419 for ; Wed, 30 Jan 2019 13:19:53 +0100 (CET) In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: ALSA development , Mark Brown , Phil Burk , Leo Yan , Baolin Wang List-Id: alsa-devel@alsa-project.org 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 Linux Sound Maintainer; ALSA Project; Red Hat, Inc.