Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
30402c89
Commit
30402c89
authored
Jun 12, 2016
by
Miklos Szeredi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus
parents
b581755b
eb0a4a47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
include/linux/dcache.h
include/linux/dcache.h
+12
-0
net/unix/af_unix.c
net/unix/af_unix.c
+3
-3
No files found.
include/linux/dcache.h
View file @
30402c89
...
...
@@ -575,5 +575,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry,
return
inode
;
}
/**
* d_real_inode - Return the real inode
* @dentry: The dentry to query
*
* If dentry is on an union/overlay, then return the underlying, real inode.
* Otherwise return d_inode().
*/
static
inline
struct
inode
*
d_real_inode
(
struct
dentry
*
dentry
)
{
return
d_backing_inode
(
d_real
(
dentry
));
}
#endif
/* __LINUX_DCACHE_H */
net/unix/af_unix.c
View file @
30402c89
...
...
@@ -315,7 +315,7 @@ static struct sock *unix_find_socket_byinode(struct inode *i)
&
unix_socket_table
[
i
->
i_ino
&
(
UNIX_HASH_SIZE
-
1
)])
{
struct
dentry
*
dentry
=
unix_sk
(
s
)
->
path
.
dentry
;
if
(
dentry
&&
d_
backing
_inode
(
dentry
)
==
i
)
{
if
(
dentry
&&
d_
real
_inode
(
dentry
)
==
i
)
{
sock_hold
(
s
);
goto
found
;
}
...
...
@@ -911,7 +911,7 @@ static struct sock *unix_find_other(struct net *net,
err
=
kern_path
(
sunname
->
sun_path
,
LOOKUP_FOLLOW
,
&
path
);
if
(
err
)
goto
fail
;
inode
=
d_
backing
_inode
(
path
.
dentry
);
inode
=
d_
real
_inode
(
path
.
dentry
);
err
=
inode_permission
(
inode
,
MAY_WRITE
);
if
(
err
)
goto
put_fail
;
...
...
@@ -1048,7 +1048,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
goto
out_up
;
}
addr
->
hash
=
UNIX_HASH_SIZE
;
hash
=
d_
backing
_inode
(
dentry
)
->
i_ino
&
(
UNIX_HASH_SIZE
-
1
);
hash
=
d_
real
_inode
(
dentry
)
->
i_ino
&
(
UNIX_HASH_SIZE
-
1
);
spin_lock
(
&
unix_table_lock
);
u
->
path
=
u_path
;
list
=
&
unix_socket_table
[
hash
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment