• Yuyang Du's avatar
    locking/lockdep: Remove !dir in lock irq usage check · bf998b98
    Yuyang Du authored
    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: default avatarYuyang Du <duyuyang@gmail.com>
    Signed-off-by: default avatarPeter 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    bf998b98
lockdep.c 132 KB