summaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-05 17:03:07 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-05 17:03:07 +0100
commit76eb75be79b52a3c6ae1fd840083fa1a04458c1c (patch)
treebb90a570be2b1f521913b6233e11bae841608ad0 /net/socket.c
parentpacket: fix panic in __packet_set_timestamp on tpacket_v3 in tx mode (diff)
parentMerge tag 'xfs-for-linus-4.10-rc3' of git://git.kernel.org/pub/scm/fs/xfs/xfs... (diff)
downloadlinux-76eb75be79b52a3c6ae1fd840083fa1a04458c1c.tar.xz
linux-76eb75be79b52a3c6ae1fd840083fa1a04458c1c.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index 5f3b5a2c4f37..c65bb927b104 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -537,7 +537,7 @@ int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
{
int err = simple_setattr(dentry, iattr);
- if (!err) {
+ if (!err && (iattr->ia_valid & ATTR_UID)) {
struct socket *sock = SOCKET_I(d_inode(dentry));
sock->sk->sk_uid = iattr->ia_uid;