|
@@ -433,13 +433,6 @@ atomic_t nr_find_usage_forwards_checks;
|
|
atomic_t nr_find_usage_forwards_recursions;
|
|
atomic_t nr_find_usage_forwards_recursions;
|
|
atomic_t nr_find_usage_backwards_checks;
|
|
atomic_t nr_find_usage_backwards_checks;
|
|
atomic_t nr_find_usage_backwards_recursions;
|
|
atomic_t nr_find_usage_backwards_recursions;
|
|
-# define debug_atomic_inc(ptr) atomic_inc(ptr)
|
|
|
|
-# define debug_atomic_dec(ptr) atomic_dec(ptr)
|
|
|
|
-# define debug_atomic_read(ptr) atomic_read(ptr)
|
|
|
|
-#else
|
|
|
|
-# define debug_atomic_inc(ptr) do { } while (0)
|
|
|
|
-# define debug_atomic_dec(ptr) do { } while (0)
|
|
|
|
-# define debug_atomic_read(ptr) 0
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1900,9 +1893,9 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other,
|
|
curr->comm, task_pid_nr(curr));
|
|
curr->comm, task_pid_nr(curr));
|
|
print_lock(this);
|
|
print_lock(this);
|
|
if (forwards)
|
|
if (forwards)
|
|
- printk("but this lock took another, %s-irq-unsafe lock in the past:\n", irqclass);
|
|
|
|
|
|
+ printk("but this lock took another, %s-unsafe lock in the past:\n", irqclass);
|
|
else
|
|
else
|
|
- printk("but this lock was taken by another, %s-irq-safe lock in the past:\n", irqclass);
|
|
|
|
|
|
+ printk("but this lock was taken by another, %s-safe lock in the past:\n", irqclass);
|
|
print_lock_name(other);
|
|
print_lock_name(other);
|
|
printk("\n\nand interrupts could create inverse lock ordering between them.\n\n");
|
|
printk("\n\nand interrupts could create inverse lock ordering between them.\n\n");
|
|
|
|
|
|
@@ -2015,7 +2008,8 @@ typedef int (*check_usage_f)(struct task_struct *, struct held_lock *,
|
|
enum lock_usage_bit bit, const char *name);
|
|
enum lock_usage_bit bit, const char *name);
|
|
|
|
|
|
static int
|
|
static int
|
|
-mark_lock_irq(struct task_struct *curr, struct held_lock *this, int new_bit)
|
|
|
|
|
|
+mark_lock_irq(struct task_struct *curr, struct held_lock *this,
|
|
|
|
+ enum lock_usage_bit new_bit)
|
|
{
|
|
{
|
|
int excl_bit = exclusive_bit(new_bit);
|
|
int excl_bit = exclusive_bit(new_bit);
|
|
int read = new_bit & 1;
|
|
int read = new_bit & 1;
|
|
@@ -2043,7 +2037,7 @@ mark_lock_irq(struct task_struct *curr, struct held_lock *this, int new_bit)
|
|
* states.
|
|
* states.
|
|
*/
|
|
*/
|
|
if ((!read || !dir || STRICT_READ_CHECKS) &&
|
|
if ((!read || !dir || STRICT_READ_CHECKS) &&
|
|
- !usage(curr, this, excl_bit, state_name(new_bit)))
|
|
|
|
|
|
+ !usage(curr, this, excl_bit, state_name(new_bit & ~1)))
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
/*
|
|
/*
|