diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/scm.c | 4 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index d88ab0ae7..e5fa793a7 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -172,9 +172,9 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) if (acc_fd < 0 || acc_fd >= NR_OPEN || (file=current->files->fd[acc_fd])==NULL) return -EBADF; - if (!file->f_inode || !file->f_inode->i_sock) + if (!file->f_dentry->d_inode || !file->f_dentry->d_inode->i_sock) return -ENOTSOCK; - p->sock = &file->f_inode->u.socket_i; + p->sock = &file->f_dentry->d_inode->u.socket_i; if (p->sock->state != SS_UNCONNECTED) return -EINVAL; } diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index c912e8b2e..b684fba33 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -7,6 +7,9 @@ #include <linux/mm.h> #include <linux/sysctl.h> +#include <linux/config.h> + +#ifdef CONFIG_SYSCTL extern __u32 sysctl_wmem_max; extern __u32 sysctl_rmem_max; @@ -33,3 +36,4 @@ ctl_table core_table[] = { &proc_dointvec_jiffies}, { 0 } }; +#endif |