LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] SCTP: fix wrong debug counting of datamsg
@ 2008-04-01  3:41 Li Zefan
  2008-04-10  8:57 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-04-01  3:41 UTC (permalink / raw)
  To: David Miller; +Cc: vladislav.yasevich, lksctp-developers, netdev, LKML

Should not count it if the allocation of this object
failed.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 net/sctp/chunk.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index 4d3128f..099b0af 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -66,9 +66,10 @@ SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp)
 {
 	struct sctp_datamsg *msg;
 	msg = kmalloc(sizeof(struct sctp_datamsg), gfp);
-	if (msg)
+	if (msg) {
 		sctp_datamsg_init(msg);
-	SCTP_DBG_OBJCNT_INC(datamsg);
+		SCTP_DBG_OBJCNT_INC(datamsg);
+	}
 	return msg;
 }
 
-- 
1.5.4.rc3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] SCTP: fix wrong debug counting of datamsg
  2008-04-01  3:41 [PATCH 1/2] SCTP: fix wrong debug counting of datamsg Li Zefan
@ 2008-04-10  8:57 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-04-10  8:57 UTC (permalink / raw)
  To: lizf; +Cc: vladislav.yasevich, lksctp-developers, netdev, linux-kernel

From: Li Zefan <lizf@cn.fujitsu.com>
Date: Tue, 01 Apr 2008 11:41:15 +0800

> Should not count it if the allocation of this object
> failed.
> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

This is a bug fix, but for a debugging feature, so I
have applied it to net-2.6.26

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-10  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01  3:41 [PATCH 1/2] SCTP: fix wrong debug counting of datamsg Li Zefan
2008-04-10  8:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).