[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a1d96ae-23eb-b979-5c85-ffff057f5e5f@opensource.cirrus.com>
Date: Tue, 16 May 2023 18:14:03 +0100
From: Richard Fitzgerald <rf@...nsource.cirrus.com>
To: <gregkh@...uxfoundation.org>, <rafael@...nel.org>
CC: <linux-kernel@...r.kernel.org>, <patches@...nsource.cirrus.com>
Subject: Re: [PATCH 1/5] debugfs: Prevent NULL dereference reading from string
property
On 16/5/23 17:07, Richard Fitzgerald wrote:
> --- a/fs/debugfs/file.c
> +++ b/fs/debugfs/file.c
> @@ -878,6 +878,9 @@ ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf,
> return ret;
>
> str = *(char **)file->private_data;
> + if (!str)
> + return simple_read_from_buffer(user_buf, count, ppos, "\n", 1);
> +
Oh, this isn't right. I've somehow sent an older version that is missing
the call to debugfs_file_put(). Sorry. I'll send a v2 chain.
Powered by blists - more mailing lists