]> asedeno.scripts.mit.edu Git - linux.git/commit
locking/lockdep: Remove !dir in lock irq usage check
authorYuyang Du <duyuyang@gmail.com>
Mon, 6 May 2019 08:19:39 +0000 (16:19 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 3 Jun 2019 09:55:53 +0000 (11:55 +0200)
commitbf998b98f5bce4ebc97b3980016f54fabb7a4958
treefb88942822d3abf2f7dfcb34e2d4e9aac7cb5a8b
parent4d56330df22dd9dd9a24f147014f60ee4c914fb8
locking/lockdep: Remove !dir in lock irq usage check

In mark_lock_irq(), the following checks are performed:

   ----------------------------------
  |   ->      | unsafe | read unsafe |
  |----------------------------------|
  | safe      |  F  B  |    F* B*    |
  |----------------------------------|
  | read safe |  F? B* |      -      |
   ----------------------------------

Where:
F: check_usage_forwards
B: check_usage_backwards
*: check enabled by STRICT_READ_CHECKS
?: check enabled by the !dir condition

From checking point of view, the special F? case does not make sense,
whereas it perhaps is made for peroformance concern. As later patch will
address this issue, remove this exception, which makes the checks
consistent later.

With STRICT_READ_CHECKS = 1 which is default, there is no functional
change.

Signed-off-by: Yuyang Du <duyuyang@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bvanassche@acm.org
Cc: frederic@kernel.org
Cc: ming.lei@redhat.com
Cc: will.deacon@arm.com
Link: https://lkml.kernel.org/r/20190506081939.74287-24-duyuyang@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/lockdep.c