lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 3 Feb 2022 14:14:50 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     kernel test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [ammarfaizi2-block:paulmck/linux-rcu/dev.2022.02.01a 77/103]
 kernel/rcu/srcutree.c:424:5: error: 'struct srcu_struct' has no member named
 'srcu_size_state'

On Thu, Feb 03, 2022 at 11:00:18AM +0800, kernel test robot wrote:
> tree:   https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/dev.2022.02.01a
> head:   5721fe42e5e76b24e5a37c4fb5a4807cd4eb925d
> commit: efbdb910e14b15835266c55ad4d891dde0792aed [77/103] srcu: Dynamically allocate srcu_node array
> config: i386-randconfig-a004-20211220 (https://download.01.org/0day-ci/archive/20220203/202202031012.PzmEcyQ4-lkp@intel.com/config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>         # https://github.com/ammarfaizi2/linux-block/commit/efbdb910e14b15835266c55ad4d891dde0792aed
>         git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
>         git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/dev.2022.02.01a
>         git checkout efbdb910e14b15835266c55ad4d891dde0792aed
>         # save the config file to linux build tree
>         mkdir build_dir
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
> 
> Note: the ammarfaizi2-block/paulmck/linux-rcu/dev.2022.02.01a HEAD 5721fe42e5e76b24e5a37c4fb5a4807cd4eb925d builds fine.
>       It only hurts bisectability.
> 
> All errors (new ones prefixed by >>):
> 
>    kernel/rcu/srcutree.c: In function 'cleanup_srcu_struct':
> >> kernel/rcu/srcutree.c:424:5: error: 'struct srcu_struct' has no member named 'srcu_size_state'
>      424 |  ssp->srcu_size_state = SRCU_SIZE_SMALL;
>          |     ^~
> >> kernel/rcu/srcutree.c:424:25: error: 'SRCU_SIZE_SMALL' undeclared (first use in this function)
>      424 |  ssp->srcu_size_state = SRCU_SIZE_SMALL;
>          |                         ^~~~~~~~~~~~~~~
>    kernel/rcu/srcutree.c:424:25: note: each undeclared identifier is reported only once for each function it appears in

Good catch!

Folded the fix into the commit with attribution, thank you!

							Thanx, Paul

> vim +424 kernel/rcu/srcutree.c
> 
>    387	
>    388	/**
>    389	 * cleanup_srcu_struct - deconstruct a sleep-RCU structure
>    390	 * @ssp: structure to clean up.
>    391	 *
>    392	 * Must invoke this after you are finished using a given srcu_struct that
>    393	 * was initialized via init_srcu_struct(), else you leak memory.
>    394	 */
>    395	void cleanup_srcu_struct(struct srcu_struct *ssp)
>    396	{
>    397		int cpu;
>    398	
>    399		if (WARN_ON(!srcu_get_delay(ssp)))
>    400			return; /* Just leak it! */
>    401		if (WARN_ON(srcu_readers_active(ssp)))
>    402			return; /* Just leak it! */
>    403		flush_delayed_work(&ssp->work);
>    404		for_each_possible_cpu(cpu) {
>    405			struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu);
>    406	
>    407			del_timer_sync(&sdp->delay_work);
>    408			flush_work(&sdp->work);
>    409			if (WARN_ON(rcu_segcblist_n_cbs(&sdp->srcu_cblist)))
>    410				return; /* Forgot srcu_barrier(), so just leak it! */
>    411		}
>    412		if (WARN_ON(rcu_seq_state(READ_ONCE(ssp->srcu_gp_seq)) != SRCU_STATE_IDLE) ||
>    413		    WARN_ON(rcu_seq_current(&ssp->srcu_gp_seq) != ssp->srcu_gp_seq_needed) ||
>    414		    WARN_ON(srcu_readers_active(ssp))) {
>    415			pr_info("%s: Active srcu_struct %p read state: %d gp state: %lu/%lu\n",
>    416				__func__, ssp, rcu_seq_state(READ_ONCE(ssp->srcu_gp_seq)),
>    417				rcu_seq_current(&ssp->srcu_gp_seq), ssp->srcu_gp_seq_needed);
>    418			return; /* Caller forgot to stop doing call_srcu()? */
>    419		}
>    420		free_percpu(ssp->sda);
>    421		ssp->sda = NULL;
>    422		kfree(ssp->node);
>    423		ssp->node = NULL;
>  > 424		ssp->srcu_size_state = SRCU_SIZE_SMALL;
>    425	}
>    426	EXPORT_SYMBOL_GPL(cleanup_srcu_struct);
>    427	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ