+ lockdep-clear-whole-lockdep_map-on-initialization.patch added to -mm tree

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

 



The patch titled
     lockdep: clear whole lockdep_map on initialization
has been added to the -mm tree.  Its filename is
     lockdep-clear-whole-lockdep_map-on-initialization.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: lockdep: clear whole lockdep_map on initialization
From: Tejun Heo <tj@xxxxxxxxxx>

lockdep_init_map() only initializes parts of lockdep_map and triggers
kmemcheck warning when it is copied as a whole.  There isn't anything to
be gained by clearing selectively.  memset() the whole structure and
remove loop for ->class_cache[] clearing.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=35532

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
Reported-by: Christian Casteyde <casteyde.christian@xxxxxxx>
Tested-by: Christian Casteyde <casteyde.christian@xxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/lockdep.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff -puN kernel/lockdep.c~lockdep-clear-whole-lockdep_map-on-initialization kernel/lockdep.c
--- a/kernel/lockdep.c~lockdep-clear-whole-lockdep_map-on-initialization
+++ a/kernel/lockdep.c
@@ -2872,10 +2872,7 @@ static int mark_lock(struct task_struct 
 void lockdep_init_map(struct lockdep_map *lock, const char *name,
 		      struct lock_class_key *key, int subclass)
 {
-	int i;
-
-	for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++)
-		lock->class_cache[i] = NULL;
+	memset(lock, 0, sizeof(*lock));
 
 #ifdef CONFIG_LOCK_STAT
 	lock->cpu = raw_smp_processor_id();
_

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

origin.patch
signals-sys_ssetmask-sys_rt_sigsuspend-should-use-set_current_blocked.patch
linux-next.patch
lockdep-clear-whole-lockdep_map-on-initialization.patch
ipc-introduce-shm_rmid_forced-sysctl-testing.patch
scatterlist-new-helper-functions.patch
scatterlist-new-helper-functions-update.patch
scatterlist-new-helper-functions-update-fix.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