Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510565

Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file system

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file system
Date 2016-10-27 20:30 +0200
Message-ID <swXB7-5us-23@gated-at.bofh.it> (permalink)
References <sv4x3-3Ya-11@gated-at.bofh.it> <sv4x3-3Ya-13@gated-at.bofh.it> <swxGF-51u-9@gated-at.bofh.it> <swXrs-5ri-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Thu, 27 Oct 2016, Fenghua Yu wrote:

> On Wed, Oct 26, 2016 at 04:45:50PM +0200, Thomas Gleixner wrote:
> > On Sat, 22 Oct 2016, Fenghua Yu wrote:
> > > +/*
> > > + * Forcibly remove all of subdirectories under root.
> > > + */
> > > +static void rmdir_all_sub(void)
> > > +{
> > > +	kernfs_remove(kn_info);
> > 
> > What clears kn_info?
> 
> Is the question "Why clears kn_info?"
> 
> kn_info is created during mount time and has different contents
> under "info" directory with CDP enabled or disabled by mount parameter "cdp".
> 
> umount needs to remove kn_info so that it's ready to be created next time
> during mount time. So user can do CAT mount, check "info", umount, and then
> CDP mount, check "info". The user will see different contents in two "info"
> checks.

Lemme rephrase. What does: kn_info = NULL; ?

We should clear static variables for correctness sake. The current code has
no problem with that, but 5 month down the road something is going to trip
over the stale reference.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file  system Fenghua Yu <fenghua.yu@intel.com> - 2016-10-27 20:20 +0200
  Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file  system Thomas Gleixner <tglx@linutronix.de> - 2016-10-27 20:30 +0200
    Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file  system Fenghua Yu <fenghua.yu@intel.com> - 2016-10-27 20:40 +0200

csiph-web