+ rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     rcu: add lock annotations to rcu{,_bh}_torture_read_{lock,unlock}

has been added to the -mm tree.  Its filename is

     rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: rcu: add lock annotations to rcu{,_bh}_torture_read_{lock,unlock}
From: Josh Triplett <josht@xxxxxxxxxx>

rcu_torture_read_lock and rcu_bh_torture_read_lock acquire locks without
releasing them, and the matching functions rcu_torture_read_unlock and
rcu_bh_torture_read_unlock get called with the corresponding locks held and
release them.  Add lock annotations to these four functions so that sparse
can check callers for lock pairing, and so that sparse will not complain
about these functions since they intentionally use locks in this manner.

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
Cc: Paul McKenney <paulmck@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/rcutorture.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN kernel/rcutorture.c~rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock kernel/rcutorture.c
--- a/kernel/rcutorture.c~rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock
+++ a/kernel/rcutorture.c
@@ -192,13 +192,13 @@ static struct rcu_torture_ops *cur_ops =
  * Definitions for rcu torture testing.
  */
 
-static int rcu_torture_read_lock(void)
+static int rcu_torture_read_lock(void) __acquires(RCU)
 {
 	rcu_read_lock();
 	return 0;
 }
 
-static void rcu_torture_read_unlock(int idx)
+static void rcu_torture_read_unlock(int idx) __releases(RCU)
 {
 	rcu_read_unlock();
 }
@@ -250,13 +250,13 @@ static struct rcu_torture_ops rcu_ops = 
  * Definitions for rcu_bh torture testing.
  */
 
-static int rcu_bh_torture_read_lock(void)
+static int rcu_bh_torture_read_lock(void) __acquires(RCU_BH)
 {
 	rcu_read_lock_bh();
 	return 0;
 }
 
-static void rcu_bh_torture_read_unlock(int idx)
+static void rcu_bh_torture_read_unlock(int idx) __releases(RCU_BH)
 {
 	rcu_read_unlock_bh();
 }
_

Patches currently in -mm which might be from josht@xxxxxxxxxx are

git-nfs.patch
xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail.patch
remove-incorrect-unlock_kernel-from-allocation.patch
remove-incorrect-unlock_kernel-from-failure-path-in.patch
add-entry-for-efs-filesystem-to-maintainers-as-orphan.patch
ufs-remove-incorrect-unlock_kernel-from-failure-path-in-ufs_symlink.patch
efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch
mbcache-add-lock-annotation-for-__mb_cache_entry_release_unlock.patch
afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch
fuse-add-lock-annotations-to-request_end-and-fuse_read_interrupt.patch
hugetlbfs-add-lock-annotation-to-hugetlbfs_forget_inode.patch
jbd-add-lock-annotation-to-jbd_sync_bh.patch
fix-typo-in-maintainers-s-devics-devices.patch
fs-add-lock-annotation-to-grab_super.patch
rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch
nfsd-add-lock-annotations-to-e_start-and-e_stop.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux