On Thu, Jun 08, 2017 at 06:56:15PM +0200, Felix Schnizlein wrote:
> Enable deprecation warning if the kernel was compiled with sysfs cpuinfo.
> 
> Signed-off-by: Thomas Renninger <tr...@suse.com>
> ---
>  fs/proc/cpuinfo.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/proc/cpuinfo.c b/fs/proc/cpuinfo.c
> index 06f4d31..044f56e 100644
> --- a/fs/proc/cpuinfo.c
> +++ b/fs/proc/cpuinfo.c
> @@ -6,6 +6,10 @@
>  extern const struct seq_operations cpuinfo_op;
>  static int cpuinfo_open(struct inode *inode, struct file *file)
>  {
> +#ifdef CONFIG_CPUINFO_SYSFS
> +     pr_info("Do not access deprecated file /proc/cpuinfo, "
> +             "opened by: (%s,%d)\n", current->comm, current->pid);

Hah, that's not going to happen.  Do you know just how many different
programs open this file for no good reason?  Well, they think it's a
good reason...

You are just going to spam syslog so hard, it's going to be annoying.
This patch is not ok at all, sorry.

It's not like we are ever going to get rid of /proc/cpuinfo so it's not
a big deal.

thanks,

greg k-h

Reply via email to