Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbbGIFAL (ORCPT ); Thu, 9 Jul 2015 01:00:11 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54649 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbbGIFAG (ORCPT ); Thu, 9 Jul 2015 01:00:06 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 9 Jul 2015 13:00:03 +0800 Message-ID: Subject: Re: Linux 4.2-rc1 From: Ming Lei To: Linus Torvalds Cc: Shuah Khan , Greg Kroah-Hartman , Linux Kernel Mailing List , Shuah Khan Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 34 On Thu, Jul 9, 2015 at 11:17 AM, 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? When the request is aborted, the firmware device will be removed, so it is OK to skip the two fields. > > Something like the attached, perhaps? Looks it is fine. > > Shuah, how reproducible is this? Does this (completely untested) patch > make any difference? > > Linus -- 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/