From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754509AbcEXMeL (ORCPT ); Tue, 24 May 2016 08:34:11 -0400 Received: from mga03.intel.com ([134.134.136.65]:15381 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751856AbcEXMeJ (ORCPT ); Tue, 24 May 2016 08:34:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,359,1459839600"; d="scan'208";a="987634512" Subject: Re: [PATCH 1/3] iio: st_sensors: Init trigger before irq request To: Linus Walleij References: <3d90f889782a9c8380c3694e55a135ddd6de9bc4.1463164919.git.leonard.crestez@intel.com> Cc: Jonathan Cameron , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Daniel Baluta , Giuseppe Barba , Denis Ciocca From: Crestez Dan Leonard Message-ID: Date: Tue, 24 May 2016 15:33:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/2016 02:27 PM, Linus Walleij wrote: > On Fri, May 13, 2016 at 8:43 PM, Crestez Dan Leonard > wrote: > >> This fixes a possible race where an interrupt arrives before complete >> initialization and crashes because iio_trigger_get_drvdata returns NULL. >> >> Cc: Linus Walleij >> Cc: Giuseppe Barba >> Cc: Denis Ciocca >> Signed-off-by: Crestez Dan Leonard >> --- >> I ran into this while breaking the driver. But since the interrupt line can be >> shared the handler should always be able to accept and ignore a call. > > Reviewed-by: Linus Walleij > > However I think my patch fixing the thread issue will collide > by being close in context to this so it'd be great if you > could resend it on top of > "iio: st_sensors: switch to a threaded interrupt"? I checked my local git tree and this was already on top of v6 of that patch. I think this issue is much less likely to cause problems without it. Perhaps it should be incorporated into your patch? I'll resend if it causes conflicts for Jonathan. -- Regards, Leonard