Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:37872 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727943AbeLIWNK (ORCPT ); Sun, 9 Dec 2018 17:13:10 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Takashi Iwai" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: Subject: [PATCH 3.16 066/328] ALSA: seq: Fix poll() error return In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit a49a71f6e25da2acc637fcd31e73debd96ca18f8 upstream. The sanity checks in ALSA sequencer and OSS sequencer emulation codes return falsely -ENXIO from poll callback. They should be EPOLLERR instead. This was caught thanks to the recent change to the return value. Signed-off-by: Takashi Iwai [bwh: Backported to 3.16: s/EPOLLERR/POLLERR/] Signed-off-by: Ben Hutchings --- sound/core/seq/oss/seq_oss.c | 2 +- sound/core/seq/seq_clientmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/sound/core/seq/oss/seq_oss.c +++ b/sound/core/seq/oss/seq_oss.c @@ -194,7 +194,7 @@ odev_poll(struct file *file, poll_table struct seq_oss_devinfo *dp; dp = file->private_data; if (snd_BUG_ON(!dp)) - return -ENXIO; + return POLLERR; return snd_seq_oss_poll(dp, file, wait); } --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1110,7 +1110,7 @@ static unsigned int snd_seq_poll(struct /* check client structures are in place */ if (snd_BUG_ON(!client)) - return -ENXIO; + return POLLERR; if ((snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT) && client->data.user.fifo) {