]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Add missing mutex_unlock
authorJulia Lawall <julia@diku.dk>
Wed, 26 May 2010 05:54:21 +0000 (05:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 May 2010 07:18:48 +0000 (00:18 -0700)
commit923bd3a3c09bab71772b63c9016b0ca0ae2e582c
tree422ee585ceb87822c7e8ae18208197d25e62e23a
parent22615e2181e245e0742a798cf0e910ea76ac5406
net/rds: Add missing mutex_unlock

Add a mutex_unlock missing on the error path.  In each case, whenever the
label out is reached from elsewhere in the function, mutex is not locked.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Reviewed-by: Zach Brown <zach.brown@oracle.com>
Acked-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_cm.c
net/rds/iw_cm.c