Revert "tracing: Add ioctl() to force ring buffer waiters to wake up"

This reverts commit 84f4be2093 which is
commit 01b2a52171735c6eea80ee2f355f32bea6c41418 upstream.

It breaks the Android kernel ABI and is not needed for normal Android
systems so it is safe to remove.  If it is needed in the future, it can
be brought back in an abi-safe way.

Bug: 161946584
Change-Id: I83a717c01c4fe9cc7fbe2ea79a1da6d55b3196af
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2022-11-23 14:49:00 +00:00
parent dfd3aa1729
commit d122aaf804

View File

@@ -8321,34 +8321,12 @@ out:
return ret;
}
/* An ioctl call with cmd 0 to the ring buffer file will wake up all waiters */
static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct ftrace_buffer_info *info = file->private_data;
struct trace_iterator *iter = &info->iter;
if (cmd)
return -ENOIOCTLCMD;
mutex_lock(&trace_types_lock);
iter->wait_index++;
/* Make sure the waiters see the new wait_index */
smp_wmb();
ring_buffer_wake_waiters(iter->array_buffer->buffer, iter->cpu_file);
mutex_unlock(&trace_types_lock);
return 0;
}
static const struct file_operations tracing_buffers_fops = {
.open = tracing_buffers_open,
.read = tracing_buffers_read,
.poll = tracing_buffers_poll,
.release = tracing_buffers_release,
.splice_read = tracing_buffers_splice_read,
.unlocked_ioctl = tracing_buffers_ioctl,
.llseek = no_llseek,
};