Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78237
b: refs/heads/master
c: d392e49
h: refs/heads/master
i:
  78235: 0335ec3
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent 80f4f0a commit 32baf78
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 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: 97577e38284f48ca773392e2d401af2f6c95dc08
refs/heads/master: d392e49756a99ba51577d265d6db83e3f01c6ac8
3 changes: 3 additions & 0 deletions trunk/include/net/net_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ struct net {
/* List of all packet sockets. */
rwlock_t packet_sklist_lock;
struct hlist_head packet_sklist;

/* unix sockets */
int sysctl_unix_max_dgram_qlen;
};

#ifdef CONFIG_NET
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@
#include <net/checksum.h>
#include <linux/security.h>

int sysctl_unix_max_dgram_qlen __read_mostly = 10;

static struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
static DEFINE_SPINLOCK(unix_table_lock);
static atomic_t unix_nr_socks = ATOMIC_INIT(0);
Expand Down Expand Up @@ -594,7 +592,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
&af_unix_sk_receive_queue_lock_key);

sk->sk_write_space = unix_write_space;
sk->sk_max_ack_backlog = sysctl_unix_max_dgram_qlen;
sk->sk_max_ack_backlog = net->sysctl_unix_max_dgram_qlen;
sk->sk_destruct = unix_sock_destructor;
u = unix_sk(sk);
u->dentry = NULL;
Expand Down Expand Up @@ -2140,6 +2138,8 @@ static int unix_net_init(struct net *net)
{
int error = -ENOMEM;

net->sysctl_unix_max_dgram_qlen = 10;

#ifdef CONFIG_PROC_FS
if (!proc_net_fops_create(net, "unix", 0, &unix_seq_fops))
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/unix/sysctl_net_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static ctl_table unix_table[] = {
{
.ctl_name = NET_UNIX_MAX_DGRAM_QLEN,
.procname = "max_dgram_qlen",
.data = &sysctl_unix_max_dgram_qlen,
.data = &init_net.sysctl_unix_max_dgram_qlen,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
Expand Down

0 comments on commit 32baf78

Please sign in to comment.