From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Torokhov Subject: [PATCH 3.4 34/43] Input: allocate absinfo data when setting ABS capability Date: Mon, 6 Jan 2014 14:39:51 -0800 Message-Id: <20140106223943.227959037@linuxfoundation.org> In-Reply-To: <20140106223942.259651490@linuxfoundation.org> References: <20140106223942.259651490@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Torokhov commit 28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca upstream. We need to make sure we allocate absinfo data when we are setting one of EV_ABS/ABS_XXX capabilities, otherwise we may bomb when we try to emit this event. Rested-by: Paul Cercueil Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/input.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1707,6 +1707,10 @@ void input_set_capability(struct input_d break; case EV_ABS: + input_alloc_absinfo(dev); + if (!dev->absinfo) + return; + __set_bit(code, dev->absbit); break;