All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] use kzalloc instead of kcalloc(1, ...) in /kernel/kprobes.c
@ 2005-11-29  6:02 Daniel Marjamäki
  0 siblings, 0 replies; only message in thread
From: Daniel Marjamäki @ 2005-11-29  6:02 UTC (permalink / raw)
  To: kernel-janitors



Hello!

I believe you are patching against the wrong version, my friend.

I applied the changes manually and then made a new patch:

--- a/kernel/kprobes.c	2005-11-28 07:17:58.000000000 +0100
+++ b/kernel/kprobes.c	2005-11-29 06:29:15.000000000 +0100
@@ -408,7 +408,7 @@ static inline void add_aggr_kprobe(struc
  /*
   * This is the second or subsequent kprobe at the address - handle
   * the intricacies
- * TODO: Move kcalloc outside the spin_lock
+ * TODO: Move kzalloc outside the spin_lock
   */
  static int __kprobes register_aggr_kprobe(struct kprobe *old_p,
  					  struct kprobe *p)
@@ -420,7 +420,7 @@ static int __kprobes register_aggr_kprob
  		copy_kprobe(old_p, p);
  		ret = add_new_kprobe(old_p, p);
  	} else {
-		ap = kcalloc(1, sizeof(struct kprobe), GFP_ATOMIC);
+		ap = kzalloc(sizeof(struct kprobe), GFP_ATOMIC);
  		if (!ap)
  			return -ENOMEM;
  		add_aggr_kprobe(ap, old_p);


The line numbers are a little different here, compared to your patch.

Regards,
Daniel Marjamäki

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-29  6:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-29  6:02 [KJ] use kzalloc instead of kcalloc(1, ...) in /kernel/kprobes.c Daniel Marjamäki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.