mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
Merge branch 'master' into next
Conflicts: security/keys/internal.h security/keys/process_keys.c security/keys/request_key.c Fixed conflicts above by using the non 'tsk' versions. Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
commit
2b82892565
538 changed files with 20119 additions and 5830 deletions
|
@ -77,6 +77,7 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
|
|||
if (!fpl)
|
||||
return -ENOMEM;
|
||||
*fplp = fpl;
|
||||
INIT_LIST_HEAD(&fpl->list);
|
||||
fpl->count = 0;
|
||||
}
|
||||
fpp = &fpl->fp[fpl->count];
|
||||
|
@ -108,9 +109,25 @@ void __scm_destroy(struct scm_cookie *scm)
|
|||
|
||||
if (fpl) {
|
||||
scm->fp = NULL;
|
||||
for (i=fpl->count-1; i>=0; i--)
|
||||
fput(fpl->fp[i]);
|
||||
kfree(fpl);
|
||||
if (current->scm_work_list) {
|
||||
list_add_tail(&fpl->list, current->scm_work_list);
|
||||
} else {
|
||||
LIST_HEAD(work_list);
|
||||
|
||||
current->scm_work_list = &work_list;
|
||||
|
||||
list_add(&fpl->list, &work_list);
|
||||
while (!list_empty(&work_list)) {
|
||||
fpl = list_first_entry(&work_list, struct scm_fp_list, list);
|
||||
|
||||
list_del(&fpl->list);
|
||||
for (i=fpl->count-1; i>=0; i--)
|
||||
fput(fpl->fp[i]);
|
||||
kfree(fpl);
|
||||
}
|
||||
|
||||
current->scm_work_list = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,6 +303,7 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
|
|||
|
||||
new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);
|
||||
if (new_fpl) {
|
||||
INIT_LIST_HEAD(&new_fpl->list);
|
||||
for (i=fpl->count-1; i>=0; i--)
|
||||
get_file(fpl->fp[i]);
|
||||
memcpy(new_fpl, fpl, sizeof(*fpl));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue