Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4790230imm; Mon, 17 Sep 2018 22:23:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbCnQnN/DZ3VU95Gl2/ebSQB6u9t1heK8LmYe+dQICsqzgmqEwjp4vV/DL77wDtTIo+9Lr9 X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr27718095plc.74.1537248227803; Mon, 17 Sep 2018 22:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537248227; cv=none; d=google.com; s=arc-20160816; b=bXJphuowIWbzAdcy8OEWONEG+DwihvT35A26rbn6CmpoP6Kf59tjjbESJXyN//LjlI teSHxLTFBM44/r4ELdZCzgTiszLpaGTNBQ0nR1o4kmUTA2wt8Uo2tCkcyD4pIcx2PdPa HHJ1lhex1/FtfVARTUIycWQGh6Lijm3TIaKQ8vD23AblXePCYyznUmXCpB8DTldxHY6k aFUTqbYnOdORorkddzMll4zoCaE8pFX66lJmESCkWZ55PLAFD0igRZzl5Tbe1sr9M3j8 8H6LZ/BLqWqZwt6cqNqlSUY6M9jpMROJkfMqS69lHnJs5GtbsPPz1Uh7UqrB4t+7gia/ OqGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=L65w7kO8n6OIxZymPw7/88csyH3+lObLjNG488sACHk=; b=zIqGMuRBfJrzfw5uuQkBtvNxrY5D6AKNJ1TX06t9tfZERuDpbAxb3V6puibxLt7UzH lxjDGC53dz9xv/Eh5XHH4tE6MhdoAlZFysqKxqpfmSIR2edceDDTBDhAhx2o4SiYQq3N hsIEMrVHexKhji+gAbPLWHJAI/cgNjpUQXxgvXbTTelCurdgpGsl0aQVgrhyryMCcUJF Z/+44EA6o+P9lQLkeZL+kCkK9lpWj4IYTpHuKiTVPRaSad3ESnrQLlJiC2WpFyoW8vRX Bo+s5q+PqW/vkalg6aYHIgIkETQz3Sir2R7ihQq0quQiFELCkUfbqyWRJQSGVL8NTYsZ Zm1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@who-t.net header.s=fm1 header.b=lsu9YH18; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=iOyCOfdR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si15062495plr.32.2018.09.17.22.23.32; Mon, 17 Sep 2018 22:23:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@who-t.net header.s=fm1 header.b=lsu9YH18; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=iOyCOfdR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728689AbeIRKyB (ORCPT + 99 others); Tue, 18 Sep 2018 06:54:01 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:33617 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbeIRKx5 (ORCPT ); Tue, 18 Sep 2018 06:53:57 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id CC4D519B7; Tue, 18 Sep 2018 01:23:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 18 Sep 2018 01:23:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=who-t.net; h=cc :content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=L65w7kO8n6OIxZymP w7/88csyH3+lObLjNG488sACHk=; b=lsu9YH1897uJjMsdeImA5A7dX0ShqzuN6 VLjIZOmINPA3+srPgiJqLCzqSHUpe/o7bI8JpuiWNleI3MSFcE0IteZYmeMLu4yZ gkSE1j1ey7XpNxGw8mUkCk2cUs6J1KhhusnknOkVZ1xrh5zFlYsimSOfvgxqgREr cb4No2NZNZOSRaiAg9OGhBTkNTSnsCK+oQpK6CA7SzHojOQJu7JBTcrVLJjncD6i AJd6dntG6dcsRSP51+XsbE/9PmId62kQhxw7WMORXyb5Kd1snr4+53Nh1TCgEtyz Wumrsfwlkkn5+60kTnNrByEJAdhrKxWLOzE5091/269ILFhqDYLeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=L65w7kO8n6OIxZymPw7/88csyH3+lObLjNG488sACHk=; b=iOyCOfdR 9oB1iHXL0SDgyr6oUY7pUAIhtc0ApctLUktbW9SAdlEfvQvKCUOowzSjalcsuGd6 E43N+QAq1S6Hgt/cIJ02zIMQxmW20j1Ulyhs1ZWZKR/iyiS2ma956FVZJCXPAU7F TKr9XgRFD0U3SMRGx90O/qQHQbApVbLhpMnbI7lbNduao7m59Edw1ZRh00bgaYFx vVDqzwfEjaCLnlNOwbWMdu+NuAtcPCngIK5+59ujPUh0zpM2G4gugNfPR2dDWJMR oT/J5XPOe/ZxIPZIJ3gphMeNiczCuWTkHwDf8V0ytLZPYKu0DxrlZMLoF2jAZ4lZ AiMKZsyVJyxqbw== X-ME-Proxy: X-ME-Sender: Received: from jelly (167-179-166-29.a7b3a6.bne.nbn.aussiebb.net [167.179.166.29]) by mail.messagingengine.com (Postfix) with ESMTPA id A95D0102D9; Tue, 18 Sep 2018 01:22:58 -0400 (EDT) Date: Tue, 18 Sep 2018 15:22:56 +1000 From: Peter Hutterer To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Benjamin Tissoires Subject: [PATCH] Input: uinput - allow for max == min during input_absinfo validation Message-ID: <20180918052256.GA23446@jelly> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These values are inclusive, so a range of 1 requires min == max. Signed-off-by: Peter Hutterer --- drivers/input/misc/uinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 96a887f33698..eb14ddf69346 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code, min = abs->minimum; max = abs->maximum; - if ((min != 0 || max != 0) && max <= min) { + if ((min != 0 || max != 0) && max < min) { printk(KERN_DEBUG "%s: invalid abs[%02x] min:%d max:%d\n", UINPUT_NAME, code, min, max); -- 2.17.1