From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760249AbdEWNbZ (ORCPT ); Tue, 23 May 2017 09:31:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56638 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbdEWNbX (ORCPT ); Tue, 23 May 2017 09:31:23 -0400 Date: Tue, 23 May 2017 15:31:12 +0200 From: Greg Kroah-Hartman To: Martin Fuzzey Cc: "Luis R. Rodriguez" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: request_firmware() should propagate -ERESTARTSYS Message-ID: <20170523133112.GA5059@kroah.com> References: <20170523131607.28138.12306.stgit@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170523131607.28138.12306.stgit@localhost> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 23, 2017 at 03:16:07PM +0200, Martin Fuzzey wrote: > When -ERESTARTSYS is returned by wait_* due to a signal this should > be returned from request_firmware() so that the syscall may be > restarted if necessary. > > Without this it is not possible to distinguish the case of > request_firmware() failing due to a timeout with that due to a signal. > > In my particular case request_firmware() was being called from > a sysfs .store() callback and the writing process was the > Android init process which received a SIGCHLD causing > request_firmware() to fail. > > Signed-off-by: Martin Fuzzey > --- > drivers/base/firmware_class.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) Nice find, should this go to the stable kernels as well? thanks, greg k-h