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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Apr 2022 16:05:54 +0800
From:   Mark-PK Tsai <mark-pk.tsai@...iatek.com>
To:     <rostedt@...dmis.org>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>, <mark-pk.tsai@...iatek.com>,
        <matthias.bgg@...il.com>, <mingo@...hat.com>,
        <yj.chiang@...iatek.com>
Subject: Re: [PATCH v3 2/2] tracing: make tracer_init_tracefs initcall asynchronous


> > +static __init int tracer_init_tracefs(void)
> > +{
> > +	int ret;
> > +
> > +	trace_access_lock_init();
> > +
> > +	ret = tracing_init_dentry();
> > +	if (ret)
> > +		return 0;
> > +
> > +	INIT_WORK(&tracerfs_init_work, tracer_init_tracefs_work_func);
> > +	if (!eval_map_wq)
> > +		tracer_init_tracefs_work_func(&tracerfs_init_work);
> 
> Why go through the bother of doing the INIT_WORK if eval_map_wq is not
> created? Just do:
> 
> 	if (eval_map_wq) {
> 		INIT_WORK(&tracerfs_init_work, tracer_init_tracefs_work_func);
> 		queue_work(eval_map_wq, &tracerfs_init_work);
> 	} else {
> 		tracer_init_tracefs_work_func(NULL);
> 	}

Got it, I will update it in v4.
Thanks!

> 
> But that's just a nit anyway.
> 
> -- Steve
> 
> 
> 
> > +	else
> > +		queue_work(eval_map_wq, &tracerfs_init_work);
> >  
> >  	return 0;
> >  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ