From patchwork Thu Feb 10 23:42:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tlambert@chromium.org X-Patchwork-Id: 548051 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1ANhxGM019601 for ; Thu, 10 Feb 2011 23:44:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932340Ab1BJXnU (ORCPT ); Thu, 10 Feb 2011 18:43:20 -0500 Received: from smtp-out.google.com ([216.239.44.51]:43097 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314Ab1BJXnS (ORCPT ); Thu, 10 Feb 2011 18:43:18 -0500 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p1ANhGXp029794; Thu, 10 Feb 2011 15:43:16 -0800 Received: from tlambert.mtv.corp.google.com (tlambert.mtv.corp.google.com [172.22.72.225]) by hpaq14.eem.corp.google.com with ESMTP id p1ANhEVL008277; Thu, 10 Feb 2011 15:43:15 -0800 Received: by tlambert.mtv.corp.google.com (Postfix, from userid 127032) id 0BF5C1A1E1A; Thu, 10 Feb 2011 15:43:13 -0800 (PST) From: tlambert@chromium.org To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Terry Lambert Subject: [PATCH] Input: fixed EVIOCGRAB iterative grab/release. Date: Thu, 10 Feb 2011 15:42:50 -0800 Message-Id: <1297381370-16388-1-git-send-email-tlambert@chromium.org> X-Mailer: git-send-email 1.7.3.1 X-System-Of-Record: true Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Feb 2011 23:44:15 +0000 (UTC) diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index c8471a2..0bac8da 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -160,9 +160,9 @@ static int evdev_ungrab(struct evdev *evdev, struct evdev_client *client) if (evdev->grab != client) return -EINVAL; + input_release_device(&evdev->handle); rcu_assign_pointer(evdev->grab, NULL); synchronize_rcu(); - input_release_device(&evdev->handle); return 0; }