Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2341527ybz; Thu, 23 Apr 2020 16:21:41 -0700 (PDT) X-Google-Smtp-Source: APiQypKJT8MW5LEnKttBMD8glAKoms8FaJZoNJwF/fpWovR/xcvCp2YRfnw+Pqn7B1nblfgBJnGx X-Received: by 2002:a17:906:1393:: with SMTP id f19mr4677245ejc.26.1587684101123; Thu, 23 Apr 2020 16:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587684101; cv=none; d=google.com; s=arc-20160816; b=sDTba8B6Whtw0LPpI7VdHEMDarw/5bvKL7v6fKF4TH45/3OefcvOT+uLZmDElfhLac Vm8X1Vi85wKiGn00h/I+SSWZZIBVNeRek5jWcAniJclrbLtA8DQJKk7Q1DLq2pzDiph3 xigi7c8ajpAXyusNexm5PqWzakZjB9wAmL/f6wflpPne2FSQn1q3vBcCVpfY9G1Pauv7 +L5MlOPRWldHDVuxKLiO6jwyeaT8MPCzLHb7iOY4TKo+4mCE/Ot1stmea6R96zQbpm4M n7NRIrDxKIc063Qv4dZq6TV8KifylpaPpHnz7a8Ckz+1fDhn9ujBWI0Zx8HnZCKeScWx C62g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=9EGPLYz1k8K6maGjCDzlx8JhYLyvSW02kDV4vSXcBY4=; b=jA2W5BoxE3s6JE8CP5A8i3ghKaOF4s8ALu7YIdW9bFC9yxbJNVCEjXRB9DlX87Lbhf 6EKrss1C+VUSO0AEYqVnhHQ8EIeL0omQR8nQvOvyoLT37sjmXDXGkEzf7syGNBTMWFdu W8dysCMHkbS7sQ+/NTz4g9A5lBlR+mT/0zkxqtZzFoxQ66iauo49iQKpjaGe4te41CNz woyAec8q6i5dF11hQRFLI4iL55K+3AC/gaww7w6o5Olll+MZTAtUZkL/4A0sH7hWAboz 92RZPP6/PvxT8gB7Wp3l9lfkYQkrsv6EjazibTyWPzLAMt8ZUzvKnUkLsGnZekTzX6fI PCXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si2030739ejr.449.2020.04.23.16.21.17; Thu, 23 Apr 2020 16:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729128AbgDWXUB (ORCPT + 99 others); Thu, 23 Apr 2020 19:20:01 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:48668 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728228AbgDWXGe (ORCPT ); Thu, 23 Apr 2020 19:06:34 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jRkvM-0004bf-0S; Fri, 24 Apr 2020 00:06:28 +0100 Received: from ben by deadeye with local (Exim 4.93) (envelope-from ) id 1jRkvL-00E6kH-DZ; Fri, 24 Apr 2020 00:06:27 +0100 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, Denis Kirjanov , "Marcel Holtmann" , "Jiri Kosina" Date: Fri, 24 Apr 2020 00:05:01 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 074/245] HID: uhid: Fix returning EPOLLOUT from uhid_char_poll In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.83-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Marcel Holtmann commit be54e7461ffdc5809b67d2aeefc1ddc9a91470c7 upstream. Always return EPOLLOUT from uhid_char_poll to allow polling /dev/uhid for writable state. Fixes: 1f9dec1e0164 ("HID: uhid: allow poll()'ing on uhid devices") Signed-off-by: Marcel Holtmann Signed-off-by: Jiri Kosina [bwh: Backported to 3.16: s/EPOLL/POLL/g] Signed-off-by: Ben Hutchings --- drivers/hid/uhid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -726,7 +726,7 @@ static unsigned int uhid_char_poll(struc if (uhid->head != uhid->tail) return POLLIN | POLLRDNORM; - return 0; + return POLLOUT | POLLWRNORM; } static const struct file_operations uhid_fops = {