diff options
-rw-r--r-- | net/unix/af_unix.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5fe9d6fe08b8..75ba48b0d12a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -282,7 +282,7 @@ static inline struct sock *unix_find_socket_byname(struct net *net, | |||
282 | return s; | 282 | return s; |
283 | } | 283 | } |
284 | 284 | ||
285 | static struct sock *unix_find_socket_byinode(struct net *net, struct inode *i) | 285 | static struct sock *unix_find_socket_byinode(struct inode *i) |
286 | { | 286 | { |
287 | struct sock *s; | 287 | struct sock *s; |
288 | struct hlist_node *node; | 288 | struct hlist_node *node; |
@@ -292,9 +292,6 @@ static struct sock *unix_find_socket_byinode(struct net *net, struct inode *i) | |||
292 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { | 292 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { |
293 | struct dentry *dentry = unix_sk(s)->dentry; | 293 | struct dentry *dentry = unix_sk(s)->dentry; |
294 | 294 | ||
295 | if (!net_eq(sock_net(s), net)) | ||
296 | continue; | ||
297 | |||
298 | if (dentry && dentry->d_inode == i) { | 295 | if (dentry && dentry->d_inode == i) { |
299 | sock_hold(s); | 296 | sock_hold(s); |
300 | goto found; | 297 | goto found; |
@@ -758,7 +755,7 @@ static struct sock *unix_find_other(struct net *net, | |||
758 | err = -ECONNREFUSED; | 755 | err = -ECONNREFUSED; |
759 | if (!S_ISSOCK(inode->i_mode)) | 756 | if (!S_ISSOCK(inode->i_mode)) |
760 | goto put_fail; | 757 | goto put_fail; |
761 | u = unix_find_socket_byinode(net, inode); | 758 | u = unix_find_socket_byinode(inode); |
762 | if (!u) | 759 | if (!u) |
763 | goto put_fail; | 760 | goto put_fail; |
764 | 761 | ||