Loading kernel/trace/ipc_logging_debug.c +10 −8 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2015, 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/slab.h> Loading Loading @@ -70,17 +70,18 @@ static ssize_t debug_read_helper(struct file *file, char __user *buff, struct dentry *d = file->f_path.dentry; char *buffer; int bsize; int srcu_idx; int r; r = debugfs_use_file_start(d, &srcu_idx); if (!r) { r = debugfs_file_get(d); if (r) return r; ilctxt = file->private_data; r = kref_get_unless_zero(&ilctxt->refcount) ? 0 : -EIO; } debugfs_use_file_finish(srcu_idx); if (r) if (r) { debugfs_file_put(d); return r; } buffer = kmalloc(count, GFP_KERNEL); if (!buffer) { Loading @@ -102,6 +103,7 @@ static ssize_t debug_read_helper(struct file *file, char __user *buff, done: ipc_log_context_put(ilctxt); debugfs_file_put(d); return bsize; } Loading Loading
kernel/trace/ipc_logging_debug.c +10 −8 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2015, 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved. */ #include <linux/slab.h> Loading Loading @@ -70,17 +70,18 @@ static ssize_t debug_read_helper(struct file *file, char __user *buff, struct dentry *d = file->f_path.dentry; char *buffer; int bsize; int srcu_idx; int r; r = debugfs_use_file_start(d, &srcu_idx); if (!r) { r = debugfs_file_get(d); if (r) return r; ilctxt = file->private_data; r = kref_get_unless_zero(&ilctxt->refcount) ? 0 : -EIO; } debugfs_use_file_finish(srcu_idx); if (r) if (r) { debugfs_file_put(d); return r; } buffer = kmalloc(count, GFP_KERNEL); if (!buffer) { Loading @@ -102,6 +103,7 @@ static ssize_t debug_read_helper(struct file *file, char __user *buff, done: ipc_log_context_put(ilctxt); debugfs_file_put(d); return bsize; } Loading