diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-23 01:46:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-23 01:46:24 +0300 |
commit | bb27d4998a9e8767674e8eda225c82cc149e5bc8 (patch) | |
tree | dcabb8b8cc510003637323b30ed414b1a1ec86f6 /net/core/scm.c | |
parent | 9676e84dfd641e3366a41f2c45ac5c55dbac820f (diff) | |
parent | 35bf7692e765c2275bf93fe573f7ca868ab73453 (diff) | |
download | linux-bb27d4998a9e8767674e8eda225c82cc149e5bc8.tar.xz |
Merge char-misc-next into staging-next
This resolves the merge issues and confusions people were having with
the goldfish drivers due to changes for them showing up in two different
trees.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 14596fb37172..2696aefdc148 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -87,6 +87,7 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) *fplp = fpl; fpl->count = 0; fpl->max = SCM_MAX_FD; + fpl->user = NULL; } fpp = &fpl->fp[fpl->count]; @@ -107,6 +108,10 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) *fpp++ = file; fpl->count++; } + + if (!fpl->user) + fpl->user = get_uid(current_user()); + return num; } @@ -119,6 +124,7 @@ void __scm_destroy(struct scm_cookie *scm) scm->fp = NULL; for (i=fpl->count-1; i>=0; i--) fput(fpl->fp[i]); + free_uid(fpl->user); kfree(fpl); } } @@ -336,6 +342,7 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl) for (i = 0; i < fpl->count; i++) get_file(fpl->fp[i]); new_fpl->max = new_fpl->count; + new_fpl->user = get_uid(fpl->user); } return new_fpl; } |