Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756469AbZJNHRK (ORCPT ); Wed, 14 Oct 2009 03:17:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755572AbZJNHRJ (ORCPT ); Wed, 14 Oct 2009 03:17:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33721 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbZJNHRI (ORCPT ); Wed, 14 Oct 2009 03:17:08 -0400 Date: Wed, 14 Oct 2009 09:16:31 +0200 (CEST) From: Jiri Kosina X-X-Sender: jkosina@wotan.suse.de To: Dmitry Torokhov Cc: iceberg , Vojtech Pavlik , Linux Kernlel Mailing List , linux-input@vger.kernel.org Subject: Re: [BUG] ati_remote2.c: possible mutex_lock without mutex_unlock In-Reply-To: <20091014071428.GA5318@core.coreip.homeip.net> Message-ID: References: <1255456327.22233.0@pamir> <20091014062902.GA2971@core.coreip.homeip.net> <20091014071428.GA5318@core.coreip.homeip.net> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 35 On Wed, 14 Oct 2009, Dmitry Torokhov wrote: > > > From: Dmitry Torokhov > > > > > > input_devices_seq_start() uses mutex_lock_interruptible() to acquire > > > the input_mutex, but doesn't properly handle the situation when the > > > call fails (for example due to interrupt). Instead of returning NULL > > > (which indicates that there is no more data) we should return > > > ERR_PTR()-encoded error. > > > > > > We also need explicit flag indicating whether input_mutex was acquired > > > since input_devices_seq_stop() is called whether input_devices_seq_start() > > > was successful or not. > > > > > > The same applies to input_handlers_seq_start(). > > > > > > Reported-by: iceberg > > > Signed-off-by: Dmitry Torokhov > > > > Yup, looks OK to me. > > Putting you as "Reviewed-by.." then, OK? Sure, feel free to do that. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- 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/