lkml.org 
[lkml]   [2023]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/2] kread: avoid duplicates
On Thu, Apr 13, 2023 at 10:28:40PM -0700, Luis Chamberlain wrote:
> With this we run into 0 wasted virtual memory bytes.

This changelog does not make any sense at all, sorry. What are you
doing here and why?

>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
> fs/kernel_read_file.c | 150 ++++++++++++++++++++++++++++++++++++++++++
> kernel/module/main.c | 6 +-
> 2 files changed, 154 insertions(+), 2 deletions(-)
>
> diff --git a/fs/kernel_read_file.c b/fs/kernel_read_file.c
> index 5d826274570c..209c56764442 100644
> --- a/fs/kernel_read_file.c
> +++ b/fs/kernel_read_file.c
> @@ -4,6 +4,7 @@
> #include <linux/kernel_read_file.h>
> #include <linux/security.h>
> #include <linux/vmalloc.h>
> +#include <linux/fdtable.h>
>
> /**
> * kernel_read_file() - read file contents into a kernel buffer
> @@ -171,17 +172,166 @@ ssize_t kernel_read_file_from_path_initns(const char *path, loff_t offset,
> }
> EXPORT_SYMBOL_GPL(kernel_read_file_from_path_initns);
>
> +DEFINE_MUTEX(kread_dup_mutex);

static?

I stopped reading here :)

thanks,

greg k-h

\
 
 \ /
  Last update: 2023-04-14 08:36    [W:3.843 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site