diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/net/socket.c b/net/socket.c index 8809afccf7fa..70bbde65e4ca 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -113,7 +113,6 @@ unsigned int sysctl_net_busy_read __read_mostly; | |||
113 | unsigned int sysctl_net_busy_poll __read_mostly; | 113 | unsigned int sysctl_net_busy_poll __read_mostly; |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | static int sock_no_open(struct inode *irrelevant, struct file *dontcare); | ||
117 | static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, | 116 | static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, |
118 | unsigned long nr_segs, loff_t pos); | 117 | unsigned long nr_segs, loff_t pos); |
119 | static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, | 118 | static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, |
@@ -151,7 +150,6 @@ static const struct file_operations socket_file_ops = { | |||
151 | .compat_ioctl = compat_sock_ioctl, | 150 | .compat_ioctl = compat_sock_ioctl, |
152 | #endif | 151 | #endif |
153 | .mmap = sock_mmap, | 152 | .mmap = sock_mmap, |
154 | .open = sock_no_open, /* special open code to disallow open via /proc */ | ||
155 | .release = sock_close, | 153 | .release = sock_close, |
156 | .fasync = sock_fasync, | 154 | .fasync = sock_fasync, |
157 | .sendpage = sock_sendpage, | 155 | .sendpage = sock_sendpage, |
@@ -559,23 +557,6 @@ static struct socket *sock_alloc(void) | |||
559 | return sock; | 557 | return sock; |
560 | } | 558 | } |
561 | 559 | ||
562 | /* | ||
563 | * In theory you can't get an open on this inode, but /proc provides | ||
564 | * a back door. Remember to keep it shut otherwise you'll let the | ||
565 | * creepy crawlies in. | ||
566 | */ | ||
567 | |||
568 | static int sock_no_open(struct inode *irrelevant, struct file *dontcare) | ||
569 | { | ||
570 | return -ENXIO; | ||
571 | } | ||
572 | |||
573 | const struct file_operations bad_sock_fops = { | ||
574 | .owner = THIS_MODULE, | ||
575 | .open = sock_no_open, | ||
576 | .llseek = noop_llseek, | ||
577 | }; | ||
578 | |||
579 | /** | 560 | /** |
580 | * sock_release - close a socket | 561 | * sock_release - close a socket |
581 | * @sock: socket to close | 562 | * @sock: socket to close |