All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	vz@mleia.com, Tejun Heo <tj@kernel.org>
Cc: Ming Lei <ming.lei@canonical.com>,
	Shuah Khan <shuahkhan@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 4.2-rc1
Date: Fri, 10 Jul 2015 10:58:02 -0600	[thread overview]
Message-ID: <559FF99A.30509@osg.samsung.com> (raw)
In-Reply-To: <559EB218.80404@osg.samsung.com>

On 07/09/2015 11:40 AM, Shuah Khan wrote:
> On 07/09/2015 08:45 AM, Greg Kroah-Hartman wrote:
>> On Thu, Jul 09, 2015 at 07:44:04AM -0600, Shuah Khan wrote:
>>> On 07/09/2015 07:10 AM, Shuah Khan wrote:
>>>> On 07/08/2015 09:17 PM, Linus Torvalds wrote:
>>>>> On Wed, Jul 8, 2015 at 5:58 PM, Ming Lei <ming.lei@canonical.com> wrote:
>>>>>> On Thu, Jul 9, 2015 at 1:29 AM, Linus Torvalds
>>>>>> <torvalds@linux-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?
>>>>>
>>>>
>>>> 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.
>>>>
>>>
>>> Yes. This patch fixed the problem.
>>
>> That's great, but what changed recently to cause this problem to happen?
>> Any chance you can bisect to the problem commit?
>>
> 
> :) Starting bisect now. Thankfully I built 4.1.0 in this tree
> which is good place to start. Let you know in a bit
> 

Ok here is the bisect result. Did I mention "I really love bisect
on the very first rc after the merge window" :)

I am not sure why this patch would cause the problem I am seeing.
This patch itself looks like a cleanup type patch and doesn't
really fix a bug. I am building with this patch reverted at the
moment to confirm. In the meantime:


eaa5cd926345f86e9df1eb6b0490da539f5ce7d0 is the first bad commit
commit eaa5cd926345f86e9df1eb6b0490da539f5ce7d0
Author: Vladimir Zapolskiy <vz@mleia.com>
Date:   Fri May 22 00:21:16 2015 +0300

    fs: sysfs: don't pass count == 0 to bin file readers

    If count == 0 bytes are requested by a reader, sysfs_kf_bin_read()
    deliberately returns 0 without passing a potentially harmful value to
    some externally defined underlying battr->read() function.

    However in case of (pos == size && count) the next clause always sets
    count to 0 and this value is handed over to battr->read().

    The change intends to make obsolete (and remove later) a redundant
    sanity check in battr->read(), if it is present, or add more
    protection to struct bin_attribute users, who does not care about
    input arguments.

    Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
    Acked-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

:040000 040000 aca6ce463db111e3b3ef3fe4ed799a670618b1c4
2aad70773e76e899561ef4a8851174ae87793fed M	fs


Complete bisect log:


git bisect start
# bad: [d6ac4ffc61ace6ed6f183e9fd7f207c0ddafb897] Merge branch
'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
git bisect bad d6ac4ffc61ace6ed6f183e9fd7f207c0ddafb897
# good: [b953c0d234bc72e8489d3bf51a276c5c4ec85345] Linux 4.1
git bisect good b953c0d234bc72e8489d3bf51a276c5c4ec85345
# good: [4570a37169d4b44d316f40b2ccc681dc93fedc7b] Merge tag
'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
git bisect good 4570a37169d4b44d316f40b2ccc681dc93fedc7b
# bad: [8d7804a2f03dbd34940fcb426450c730adf29dae] Merge tag
'driver-core-4.2-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
git bisect bad 8d7804a2f03dbd34940fcb426450c730adf29dae
# good: [3d9f96d850e4bbfae24dc9aee03033dd77c81596] Merge tag 'armsoc-dt'
of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect good 3d9f96d850e4bbfae24dc9aee03033dd77c81596
# good: [692a59e696afe1a4e777d0e4359325336ab0ad89] drm/amdgpu: remove
AMDGPU_CTX_OP_STATE_RUNNING
git bisect good 692a59e696afe1a4e777d0e4359325336ab0ad89
# good: [099bfbfc7fbbe22356c02f0caf709ac32e1126ea] Merge branch
'drm-next' of git://people.freedesktop.org/~airlied/linux
git bisect good 099bfbfc7fbbe22356c02f0caf709ac32e1126ea
# good: [19a4fb21f804dbd5a327eba7a1569b6b8e941a54] i2c-parport: define
ports to connect
git bisect good 19a4fb21f804dbd5a327eba7a1569b6b8e941a54
# good: [3dc196eae1db548f05e53e5875ff87b8ff79f249] mei: me: wait for
power gating exit confirmation
git bisect good 3dc196eae1db548f05e53e5875ff87b8ff79f249
# good: [e382608254e06c8109f40044f5e693f2e04f3899] Merge tag
'trace-v4.2' of
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
git bisect good e382608254e06c8109f40044f5e693f2e04f3899
# good: [f5727b05d221796baf69667ed5c891d4bd53711e] firmware: fix
__getname() missing failure check
git bisect good f5727b05d221796baf69667ed5c891d4bd53711e
# good: [9ba8af66432cb8e82553f2e273eb11db0cec7d2d] base:dd - Fix for
typo in comment to function driver_deferred_probe_trigger().
git bisect good 9ba8af66432cb8e82553f2e273eb11db0cec7d2d
# bad: [8b2dcebae330fb6dffc7717b740aa4b2c4d00451] Revert "base/platform:
Remove code duplication"
git bisect bad 8b2dcebae330fb6dffc7717b740aa4b2c4d00451
# bad: [303cda0ea7c1c33701812ccb80d37083a4093c7c] firmware: add missing
kfree for work on async call
git bisect bad 303cda0ea7c1c33701812ccb80d37083a4093c7c
# bad: [eaa5cd926345f86e9df1eb6b0490da539f5ce7d0] fs: sysfs: don't pass
count == 0 to bin file readers
git bisect bad eaa5cd926345f86e9df1eb6b0490da539f5ce7d0
# first bad commit: [eaa5cd926345f86e9df1eb6b0490da539f5ce7d0] fs:
sysfs: don't pass count == 0 to bin file readers

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

  reply	other threads:[~2015-07-10 16:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-05 20:22 Linux 4.2-rc1 Linus Torvalds
2015-07-05 23:01 ` Guenter Roeck
2015-07-07  5:50 ` linux-next: stats (Was: Linux 4.2-rc1) Stephen Rothwell
2015-07-07  5:50   ` Stephen Rothwell
2015-07-07 12:56 ` Build failure on ARM64 for Linux 4.2-rc1 was: Linux 4.2-rc1 Mark Langsdorf
2015-07-09 16:46   ` Mark Langsdorf
2015-07-09 16:46     ` Mark Langsdorf
2015-07-09 16:59     ` Peter Zijlstra
2015-07-09 16:59       ` Peter Zijlstra
2015-07-13 16:55       ` Mark Langsdorf
2015-07-13 16:55         ` Mark Langsdorf
2015-07-08 16:32 ` Shuah Khan
2015-07-08 17:05   ` Casey Schaufler
2015-07-08 17:33     ` Shuah Khan
2015-07-08 17:55       ` Casey Schaufler
2015-07-08 17:55         ` Casey Schaufler
2015-07-08 17:17   ` Linus Torvalds
2015-07-08 17:29     ` Linus Torvalds
2015-07-08 17:47       ` Casey Schaufler
2015-07-08 18:03         ` Stephen Smalley
2015-07-08 18:07         ` William Roberts
2015-07-08 18:45           ` Casey Schaufler
2015-07-09  0:58       ` Ming Lei
2015-07-09  3:17         ` Linus Torvalds
2015-07-09  5:00           ` Ming Lei
2015-07-09 13:10           ` Shuah Khan
2015-07-09 13:44             ` Shuah Khan
2015-07-09 13:47               ` Shuah Khan
2015-07-09 14:45               ` Greg Kroah-Hartman
2015-07-09 17:40                 ` Shuah Khan
2015-07-10 16:58                   ` Shuah Khan [this message]
2015-07-10 17:11                     ` Linus Torvalds
     [not found]                       ` <55A03A33.8060405@osg.samsung.com>
     [not found]                         ` <CA+55aFzDu9acMKHJFkxzg+1jeHNpGRhmM=pu2z-so5QYTMbvcA@mail.gmail.com>
2015-07-10 21:57                           ` Shuah Khan
2015-07-10 22:36                           ` Ming Lei
2015-07-08 19:00     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559FF99A.30509@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=shuahkhan@gmail.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.