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 1/2] SCTP: fix wrong debug counting of datamsg
Date: Tue, 01 Apr 2008 11:41:15 +0800 [thread overview]
Message-ID: <47F1AEDB.1080300@cn.fujitsu.com> (raw)
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
next reply other threads:[~2008-04-01 3:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 3:41 Li Zefan [this message]
2008-04-10 8:57 ` [PATCH 1/2] SCTP: fix wrong debug counting of datamsg 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=47F1AEDB.1080300@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).