+ rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture.patch added to -mm tree

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

 



The patch titled

     rcu: Avoid kthread_stop on invalid pointer if rcutorture reader startup fails

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

     rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture.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: Avoid kthread_stop on invalid pointer if rcutorture reader startup fails
From: Josh Triplett <josht@xxxxxxxxxx>

rcu_torture_init kmallocs the array of reader threads, then creates each
one with kthread_run, cleaning up with rcu_torture_cleanup if this fails. 
rcu_torture_cleanup calls kthread_stop on any non-NULL pointer in the
array; however, any readers after the one that failed to start up will have
invalid pointers, not null pointers.  Avoid this by using kzalloc instead.

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

 kernel/rcutorture.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/rcutorture.c~rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture kernel/rcutorture.c
--- a/kernel/rcutorture.c~rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture
+++ a/kernel/rcutorture.c
@@ -780,7 +780,7 @@ rcu_torture_init(void)
 		writer_task = NULL;
 		goto unwind;
 	}
-	reader_tasks = kmalloc(nrealreaders * sizeof(reader_tasks[0]),
+	reader_tasks = kzalloc(nrealreaders * sizeof(reader_tasks[0]),
 			       GFP_KERNEL);
 	if (reader_tasks == NULL) {
 		VERBOSE_PRINTK_ERRSTRING("out of memory");
_

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

xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail.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
fs-add-lock-annotation-to-grab_super.patch
rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch
timer-add-lock-annotation-to-lock_timer_base.patch
nfsd-add-lock-annotations-to-e_start-and-e_stop.patch
rcu-add-module_author-to-rcutorture-module.patch
rcu-fix-incorrect-description-of-default-for-rcutorture.patch
rcu-mention-rcu_bh-in-description-of-rcutortures.patch
rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture.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