SCTP: fix wrong debug counting of datamsg
Subsystems (3)
PATCH 1/2 SCTP: fix wrong debug counting of datamsg
Should not count it if the allocation of this object failed.
Signed-off-by Li Zefan <[email protected]>
--- net/sctp/chunk.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
net/sctp/chunk.c +3 -2
@@ -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; }
Signature · 1 line
1.5.4.rc3
David Miller
maintainerFrom: Li Zefan <[email protected]>
Date: Tue, 01 Apr 2008 11:41:15 +0800
Quoted 4 lines
Should not count it if the allocation of this object failed.
Signed-off-by Li Zefan <[email protected]>
This is a bug fix, but for a debugging feature, so I have applied it to net-2.6.26