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

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

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

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d994d82..698b741 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5761,8 +5761,8 @@ static struct sctp_bind_bucket *sctp_bucket_create(
 	struct sctp_bind_bucket *pp;
 
 	pp = kmem_cache_alloc(sctp_bucket_cachep, GFP_ATOMIC);
-	SCTP_DBG_OBJCNT_INC(bind_bucket);
 	if (pp) {
+		SCTP_DBG_OBJCNT_INC(bind_bucket);
 		pp->port = snum;
 		pp->fastreuse = 0;
 		INIT_HLIST_HEAD(&pp->owner);
-- 
1.5.4.rc3


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

* Re: [PATCH 2/2] SCTP: fix wrong debug counting of bind_bucket
  2008-04-01  3:42 [PATCH 2/2] SCTP: fix wrong debug counting of bind_bucket Li Zefan
@ 2008-04-10  8:58 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-04-10  8:58 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:42:12 +0800

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

Also applied to net-2.6.26, thanks.

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

end of thread, other threads:[~2008-04-10  8:58 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:42 [PATCH 2/2] SCTP: fix wrong debug counting of bind_bucket Li Zefan
2008-04-10  8:58 ` 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).