Commit 13b73446 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'trace-v6.7-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix another kerneldoc warning

 - Fix eventfs files to inherit the ownership of its parent directory.

   The dynamic creation of dentries in eventfs did not take into account
   if the tracefs file system was mounted with a gid/uid, and would
   still default to the gid/uid of root. This is a regression.

 - Fix warning when synthetic event testing is enabled along with
   startup event tracing testing is enabled

* tag 'trace-v6.7-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing / synthetic: Disable events after testing in synth_event_gen_test_init()
  eventfs: Have event files and directories default to parent uid and gid
  tracing/synthetic: fix kernel-doc warnings
parents 7c5e046b 88b30c7f
...@@ -148,7 +148,8 @@ static const struct file_operations eventfs_file_operations = { ...@@ -148,7 +148,8 @@ static const struct file_operations eventfs_file_operations = {
.release = eventfs_release, .release = eventfs_release,
}; };
static void update_inode_attr(struct inode *inode, struct eventfs_attr *attr, umode_t mode) static void update_inode_attr(struct dentry *dentry, struct inode *inode,
struct eventfs_attr *attr, umode_t mode)
{ {
if (!attr) { if (!attr) {
inode->i_mode = mode; inode->i_mode = mode;
...@@ -162,9 +163,13 @@ static void update_inode_attr(struct inode *inode, struct eventfs_attr *attr, um ...@@ -162,9 +163,13 @@ static void update_inode_attr(struct inode *inode, struct eventfs_attr *attr, um
if (attr->mode & EVENTFS_SAVE_UID) if (attr->mode & EVENTFS_SAVE_UID)
inode->i_uid = attr->uid; inode->i_uid = attr->uid;
else
inode->i_uid = d_inode(dentry->d_parent)->i_uid;
if (attr->mode & EVENTFS_SAVE_GID) if (attr->mode & EVENTFS_SAVE_GID)
inode->i_gid = attr->gid; inode->i_gid = attr->gid;
else
inode->i_gid = d_inode(dentry->d_parent)->i_gid;
} }
/** /**
...@@ -206,7 +211,7 @@ static struct dentry *create_file(const char *name, umode_t mode, ...@@ -206,7 +211,7 @@ static struct dentry *create_file(const char *name, umode_t mode,
return eventfs_failed_creating(dentry); return eventfs_failed_creating(dentry);
/* If the user updated the directory's attributes, use them */ /* If the user updated the directory's attributes, use them */
update_inode_attr(inode, attr, mode); update_inode_attr(dentry, inode, attr, mode);
inode->i_op = &eventfs_file_inode_operations; inode->i_op = &eventfs_file_inode_operations;
inode->i_fop = fop; inode->i_fop = fop;
...@@ -242,7 +247,8 @@ static struct dentry *create_dir(struct eventfs_inode *ei, struct dentry *parent ...@@ -242,7 +247,8 @@ static struct dentry *create_dir(struct eventfs_inode *ei, struct dentry *parent
return eventfs_failed_creating(dentry); return eventfs_failed_creating(dentry);
/* If the user updated the directory's attributes, use them */ /* If the user updated the directory's attributes, use them */
update_inode_attr(inode, &ei->attr, S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO); update_inode_attr(dentry, inode, &ei->attr,
S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO);
inode->i_op = &eventfs_root_dir_inode_operations; inode->i_op = &eventfs_root_dir_inode_operations;
inode->i_fop = &eventfs_file_operations; inode->i_fop = &eventfs_file_operations;
......
...@@ -477,6 +477,17 @@ static int __init synth_event_gen_test_init(void) ...@@ -477,6 +477,17 @@ static int __init synth_event_gen_test_init(void)
ret = test_trace_synth_event(); ret = test_trace_synth_event();
WARN_ON(ret); WARN_ON(ret);
/* Disable when done */
trace_array_set_clr_event(gen_synth_test->tr,
"synthetic",
"gen_synth_test", false);
trace_array_set_clr_event(empty_synth_test->tr,
"synthetic",
"empty_synth_test", false);
trace_array_set_clr_event(create_synth_test->tr,
"synthetic",
"create_synth_test", false);
out: out:
return ret; return ret;
} }
......
...@@ -1137,7 +1137,7 @@ EXPORT_SYMBOL_GPL(synth_event_add_fields); ...@@ -1137,7 +1137,7 @@ EXPORT_SYMBOL_GPL(synth_event_add_fields);
* @cmd: A pointer to the dynevent_cmd struct representing the new event * @cmd: A pointer to the dynevent_cmd struct representing the new event
* @name: The name of the synthetic event * @name: The name of the synthetic event
* @mod: The module creating the event, NULL if not created from a module * @mod: The module creating the event, NULL if not created from a module
* @args: Variable number of arg (pairs), one pair for each field * @...: Variable number of arg (pairs), one pair for each field
* *
* NOTE: Users normally won't want to call this function directly, but * NOTE: Users normally won't want to call this function directly, but
* rather use the synth_event_gen_cmd_start() wrapper, which * rather use the synth_event_gen_cmd_start() wrapper, which
...@@ -1695,7 +1695,7 @@ __synth_event_trace_end(struct synth_event_trace_state *trace_state) ...@@ -1695,7 +1695,7 @@ __synth_event_trace_end(struct synth_event_trace_state *trace_state)
* synth_event_trace - Trace a synthetic event * synth_event_trace - Trace a synthetic event
* @file: The trace_event_file representing the synthetic event * @file: The trace_event_file representing the synthetic event
* @n_vals: The number of values in vals * @n_vals: The number of values in vals
* @args: Variable number of args containing the event values * @...: Variable number of args containing the event values
* *
* Trace a synthetic event using the values passed in the variable * Trace a synthetic event using the values passed in the variable
* argument list. * argument list.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment