From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754517Ab3A3KbD (ORCPT ); Wed, 30 Jan 2013 05:31:03 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41588 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753726Ab3A3KbB (ORCPT ); Wed, 30 Jan 2013 05:31:01 -0500 Date: Wed, 30 Jan 2013 11:31:00 +0100 Message-ID: From: Takashi Iwai To: Ming Lei Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] firmware: Refactoring for splitting user-mode helper code In-Reply-To: References: <1359470814-7993-1-git-send-email-tiwai@suse.de> <1359470814-7993-2-git-send-email-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 30 Jan 2013 18:25:20 +0800, Ming Lei wrote: > > On Wed, Jan 30, 2013 at 3:17 PM, Takashi Iwai wrote: > >> The above usermodehelper_read_lock thing may be a functional change, > >> and looks not what you claimed in commit log, :-). The lock is currently held in > >> direct loading case, but your patch change the rule. Without holding the lock, > >> request_firmware() may touch filesystem / storage too early during > >> kernel boot or system resume in direct loading case. > > > > Does it really happen in a real scenario? > > Some crazy drivers might call request_firmware inside resume callback, > with usermodehelper_read_lock, we can find the mistake easily and log it. But it's supposed to be cached, no? > > If so, using usermode helper lock for that purpose sounds like an > > abuse to be fixed differently or replaced with a better one. > > Might be, but looks not good to introduce this change in a code > refactoring patch. Or you can do it in another patch for discussion > if you have better way to handle the situation. Yes, I already modified the code again. Will resubmit them soon. Takashi