Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756685AbXJ2MzR (ORCPT ); Mon, 29 Oct 2007 08:55:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753191AbXJ2MzE (ORCPT ); Mon, 29 Oct 2007 08:55:04 -0400 Received: from ug-out-1314.google.com ([66.249.92.174]:32917 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118AbXJ2MzB (ORCPT ); Mon, 29 Oct 2007 08:55:01 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B/NHbQpbp4oKkv7eqyGlMeDoiJGz4ADzm9GErbEAxaKFsiBBIWuNCxRYaxipQkLnm1LVasNmcMY3+4Gsf/N2mT1VISo25O63yzxlrEKrGE78qIyQYEdoXCWQkhDZjyDaJdPRDbW66WAHXlwMWQ4syajkA3SedKFJvt+WMd5QN0k= Message-ID: Date: Mon, 29 Oct 2007 08:54:59 -0400 From: "Dmitry Torokhov" To: "Jiri Kosina" Subject: Re: [PATCH] INPUT: fix hidinput_connect ignoring retval from input_register_device Cc: "Dirk Hohndel" , "Jeff Garzik" , linux-input@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071029084917.GA12968@bigserver.hohndel.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 25 On 10/29/07, Jiri Kosina wrote: > On Mon, 29 Oct 2007, Dirk Hohndel wrote: > > > [INPUT] hidinput_connect incorrectly ignored return value from > > input_register_device > > Signed-off-by: Dirk Hohndel > > Will apply Please don't - the fix is completely broken for multi-input devices - if 2nd device fails to register we bail out of hidinput_connect and thus never set HID_CLAIMED_INPUT bit. So when we disconnect device we never call hidinput_disconnect and who knows what will happen after that. hidinput_connect() should properly unwind already registered devices after failure. -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/