[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxc6Dg40L1CvNkxWopaO1_WQUu9L5ncv=8VgsGgB8ZgFQ@mail.gmail.com>
Date: Wed, 8 Jul 2015 20:17:52 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ming Lei <ming.lei@...onical.com>
Cc: Shuah Khan <shuahkhan@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Shuah Khan <shuahkh@....samsung.com>
Subject: Re: Linux 4.2-rc1
On Wed, Jul 8, 2015 at 5:58 PM, Ming Lei <ming.lei@...onical.com> wrote:
> On Thu, Jul 9, 2015 at 1:29 AM, Linus Torvalds
> <torvalds@...ux-foundation.org> 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?
Linus
View attachment "patch.diff" of type "text/plain" (1254 bytes)
Powered by blists - more mailing lists