From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753637AbbGINK2 (ORCPT ); Thu, 9 Jul 2015 09:10:28 -0400 Received: from lists.s-osg.org ([54.187.51.154]:36749 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261AbbGINKX (ORCPT ); Thu, 9 Jul 2015 09:10:23 -0400 Message-ID: <559E72B1.2050903@osg.samsung.com> Date: Thu, 09 Jul 2015 07:10:09 -0600 From: Shuah Khan Organization: Samsung Open Source Group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Linus Torvalds , Ming Lei CC: Shuah Khan , Greg Kroah-Hartman , Linux Kernel Mailing List Subject: Re: Linux 4.2-rc1 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2015 09:17 PM, Linus Torvalds wrote: > On Wed, Jul 8, 2015 at 5:58 PM, Ming Lei wrote: >> On Thu, Jul 9, 2015 at 1:29 AM, Linus Torvalds >> wrote: >>> Also, it looks like you need to hold the "fw_lock" to even look at >>> that pointer, since the buffer can get reallocated etc. >> >> Yes, the above code with holding 'fw_lock' is right fix for the issue since >> sysfs read can happen anytime, and there is one race between firmware >> request abort and reading uevent of sysfs. > > So if fw_priv->buf is NULL, what should we do? > > Should we skip the TIMEOUT= and ASYNC= fields too? > > Something like the attached, perhaps? > > Shuah, how reproducible is this? Does this (completely untested) patch > make any difference? > Happened both times I booted 4.2-rc1 up, so I would say 100% so far. I will test with your patch and report results. -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978