The patch titled arch/sh/mm: eliminate a double lock has been added to the -mm tree. Its filename is arch-sh-mm-eliminate-a-double-lock.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: arch/sh/mm: eliminate a double lock From: Julia Lawall <julia@xxxxxxx> The function begins and ends with a read_lock. The latter is changed to a read_unlock. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @locked@ expression E1; position p; @@ read_lock(E1@p,...); @r exists@ expression x <= locked.E1; expression locked.E1; expression E2; identifier lock; position locked.p,p1,p2; @@ *lock@p1 (E1@p,...); ... when != E1 when != \(x = E2\|&x\) *lock@p2 (E1,...); // </smpl> Signed-off-by: Julia Lawall <julia@xxxxxxx> Acked-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxx> Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sh/mm/pmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN arch/sh/mm/pmb.c~arch-sh-mm-eliminate-a-double-lock arch/sh/mm/pmb.c --- a/arch/sh/mm/pmb.c~arch-sh-mm-eliminate-a-double-lock +++ a/arch/sh/mm/pmb.c @@ -770,7 +770,7 @@ static void __init pmb_resize(void) spin_unlock_irqrestore(&pmbe->lock, flags); } - read_lock(&pmb_rwlock); + read_unlock(&pmb_rwlock); } #endif _ Patches currently in -mm which might be from julia@xxxxxxx are linux-next.patch drivers-hid-eliminate-a-double-lock.patch arch-sh-mm-eliminate-a-double-lock.patch fs-btrfs-use-memdup_user.patch fs-btrfs-use-err_cast.patch drivers-dma-eliminate-a-null-pointer-dereference.patch drivers-media-use-memdup_user.patch drivers-media-video-pvrusb2-add-missing-mutex_unlock.patch drivers-video-omap2-displays-add-missing-mutex_unlock.patch drivers-s390-net-use-memdup_user.patch drivers-scsi-libsas-use-sam_good.patch drivers-scsi-remove-unnecessary-null-test.patch drivers-message-move-dereference-after-null-test.patch drivers-scsi-correct-the-size-argument-to-kmalloc.patch drivers-scsi-use-memdup_user.patch drivers-block-use-memdup_user.patch arch-sparc-kernel-eliminate-what-looks-like-a-null-pointer-dereference.patch mm-use-memdup_user.patch mm-use-err_cast.patch drivers-message-i2o-exec-osmc-add-missing-mutex_unlock.patch drivers-char-n_gsmc-add-missing-spin_unlock_irqrestore.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html