Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103642
b: refs/heads/master
c: c4e85f8
h: refs/heads/master
v: v3
  • Loading branch information
Florian Westphal authored and David S. Miller committed Jul 19, 2008
1 parent 028336f commit 26d1652
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1e20f7c8b9ccbafc9ea78f2b406738728ce6b81
refs/heads/master: c4e85f82edcd6027cfe67331a2e00741b009756b
4 changes: 2 additions & 2 deletions trunk/net/sctp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ config SCTP_DBG_MSG

config SCTP_DBG_OBJCNT
bool "SCTP: Debug object counts"
depends on PROC_FS
help
If you say Y, this will enable debugging support for counting the
type of objects that are currently allocated. This is useful for
identifying memory leaks. If the /proc filesystem is enabled this
debug information can be viewed by
identifying memory leaks. This debug information can be viewed by
'cat /proc/net/sctp/sctp_dbg_objcnt'

If unsure, say N
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \
transport.o chunk.o sm_make_chunk.o ulpevent.o \
inqueue.o outqueue.o ulpqueue.o command.o \
tsnmap.o bind_addr.o socket.o primitive.o \
output.o input.o debug.o ssnmap.o proc.o \
auth.o
output.o input.o debug.o ssnmap.o auth.o

sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o
sctp-$(CONFIG_PROC_FS) += proc.o
sctp-$(CONFIG_SYSCTL) += sysctl.o

sctp-$(subst m,y,$(CONFIG_IPV6)) += ipv6.o
11 changes: 10 additions & 1 deletion trunk/net/sctp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@

/* Global data structures. */
struct sctp_globals sctp_globals __read_mostly;
struct proc_dir_entry *proc_net_sctp;
DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics) __read_mostly;

#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_net_sctp;
#endif

struct idr sctp_assocs_id;
DEFINE_SPINLOCK(sctp_assocs_id_lock);

Expand Down Expand Up @@ -97,6 +100,7 @@ struct sock *sctp_get_ctl_sock(void)
/* Set up the proc fs entry for the SCTP protocol. */
static __init int sctp_proc_init(void)
{
#ifdef CONFIG_PROC_FS
if (!proc_net_sctp) {
struct proc_dir_entry *ent;
ent = proc_mkdir("sctp", init_net.proc_net);
Expand Down Expand Up @@ -131,6 +135,9 @@ static __init int sctp_proc_init(void)
}
out_nomem:
return -ENOMEM;
#else
return 0;
#endif /* CONFIG_PROC_FS */
}

/* Clean up the proc fs entry for the SCTP protocol.
Expand All @@ -139,6 +146,7 @@ static __init int sctp_proc_init(void)
*/
static void sctp_proc_exit(void)
{
#ifdef CONFIG_PROC_FS
sctp_snmp_proc_exit();
sctp_eps_proc_exit();
sctp_assocs_proc_exit();
Expand All @@ -148,6 +156,7 @@ static void sctp_proc_exit(void)
proc_net_sctp = NULL;
remove_proc_entry("sctp", init_net.proc_net);
}
#endif
}

/* Private helper to extract ipv4 address and stash them in
Expand Down

0 comments on commit 26d1652

Please sign in to comment.