New issue
Advanced search Search tips

Issue 719018 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

RCU debugging is broken for "opp" core in 4.4

Project Member Reported by diand...@chromium.org, May 5 2017

Issue description

Details shortly.  Just a goofed port from 3.18 to 4.4...
 
Details are all in the CL:

remote:   https://chromium-review.googlesource.com/497930 CHROMIUM: OPP: Fix RCU lockdep issues with opp        

Project Member

Comment 2 by bugdroid1@chromium.org, May 7 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3aa5037e23f009056168d76ae3ac3b55062591ab

commit 3aa5037e23f009056168d76ae3ac3b55062591ab
Author: Douglas Anderson <dianders@chromium.org>
Date: Sun May 07 02:52:31 2017

CHROMIUM: OPP: Fix RCU lockdep issues with opp

When the patch ("BACKPORT: FROMLIST: OPP: Allow notifiers to call
dev_pm_opp_get_{voltage,freq} RCU-free") was ported from chromeos-3.18
to chromeos-4.4, a mistake was made.

Nobody noticed that the opp_rcu_lockdep_assert() macro has been
changed from using rcu_lockdep_assert() (3.18) to using
RCU_LOCKDEP_WARN().  One of these two things errors on "false" and the
other errors on "true".

Because of this, the conditions that make up this assert need to be
changed to be inverted and use the opposite boolean operator.  Thus,
instead of adding the line:

  (s && srcu_read_lock_held(s)) ||

We instead should have added the line:

  !(s && srcu_read_lock_held(s)) &&

Fix it to add the right line.  While we're at it, use good C
preprocessor hygiene and add parens around the use of macro
arguments.  Thus, we actually end up with:

  !((s) && srcu_read_lock_held(s)) &&

NOTE: The above fixes a warning when compiling with RCU Lockdep
enabled.  See CL:497931 and chromium:719005

BUG= chromium:719018 
TEST=No more compiler warnings.  No RCU splats at bootup.

Change-Id: I4bfd2629aabd39f6f91de11a53155f7fef9b20ab
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/497930
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/3aa5037e23f009056168d76ae3ac3b55062591ab/drivers/base/power/opp/core.c

Status: Fixed (was: Started)

Comment 4 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment