mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Merge tag 'v4.9.129' into odroidn2-4.9.y
This is the 4.9.129 stable release
This commit is contained in:
@@ -419,6 +419,13 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list)
|
||||
struct path parent_path;
|
||||
int h, ret = 0;
|
||||
|
||||
/*
|
||||
* When we will be calling audit_add_to_parent, krule->watch might have
|
||||
* been updated and watch might have been freed.
|
||||
* So we need to keep a reference of watch.
|
||||
*/
|
||||
audit_get_watch(watch);
|
||||
|
||||
mutex_unlock(&audit_filter_mutex);
|
||||
|
||||
/* Avoid calling path_lookup under audit_filter_mutex. */
|
||||
@@ -427,8 +434,10 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list)
|
||||
/* caller expects mutex locked */
|
||||
mutex_lock(&audit_filter_mutex);
|
||||
|
||||
if (ret)
|
||||
if (ret) {
|
||||
audit_put_watch(watch);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* either find an old parent or attach a new one */
|
||||
parent = audit_find_parent(d_backing_inode(parent_path.dentry));
|
||||
@@ -446,6 +455,7 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list)
|
||||
*list = &audit_inode_hash[h];
|
||||
error:
|
||||
path_put(&parent_path);
|
||||
audit_put_watch(watch);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -5568,6 +5568,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
|
||||
unsigned long sp;
|
||||
unsigned int rem;
|
||||
u64 dyn_size;
|
||||
mm_segment_t fs;
|
||||
|
||||
/*
|
||||
* We dump:
|
||||
@@ -5585,7 +5586,10 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
|
||||
|
||||
/* Data. */
|
||||
sp = perf_user_stack_pointer(regs);
|
||||
fs = get_fs();
|
||||
set_fs(USER_DS);
|
||||
rem = __output_copy_user(handle, (void *) sp, dump_size);
|
||||
set_fs(fs);
|
||||
dyn_size = dump_size - rem;
|
||||
|
||||
perf_output_skip(handle, rem);
|
||||
|
||||
Reference in New Issue
Block a user