From: Li Zefan <lizf@cn.fujitsu.com>
To: David Miller <davem@davemloft.net>
Cc: vladislav.yasevich@hp.com,
lksctp-developers@lists.sourceforge.net, netdev@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] SCTP: fix wrong debug counting of bind_bucket
Date: Tue, 01 Apr 2008 11:42:12 +0800 [thread overview]
Message-ID: <47F1AF14.2040600@cn.fujitsu.com> (raw)
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
next reply other threads:[~2008-04-01 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 3:42 Li Zefan [this message]
2008-04-10 8:58 ` [PATCH 2/2] SCTP: fix wrong debug counting of bind_bucket David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F1AF14.2040600@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=vladislav.yasevich@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).