Re:[RFC/PATCH PATCH 6/6] lockdep: Consider the rw_state of lock while validating the chain.

From: Yong Zhang
Date: Mon Jun 01 2009 - 01:06:01 EST


<...>
>@@ -1767,9 +1773,15 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock,
>
> if (!ret)
> return 0;
>+
>+ if (ret != 2 && is_rec_read(hlock->rw_state))
>+ hlock->rw_state |= STATE_FIRST_RECURSIVE_READ;
>+
>+
> /*
> * Add dependency only if this lock is not the head
>- * of the chain, and if it's not a secondary read-lock:
>+ * of the chain, and if it's not the first instance of
>+ * the recursive read-lock:

This change maybe don't show what you want to say.
Maybe it should be "or if it's the first instance of the recursive read-lock."

> */
> if (!chain_head && ret != 2)
> if (!check_prevs_add(curr, hlock))
<...>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/