Tag: ca9fe1588427f246ad4c389b0170b29a432804b6

HID: eliminate a double lock in debug code

Author: Julia Lawall <julia@diku.dk> The path around the loop ends with the lock held, so the call to mutex_lock is moved before the beginning of the loop. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @locked@ expression E1; position p; @@ read_lock(E1@p,…); @r exists@ expression x