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-next>] [day] [month] [year] [list]
Date:	Thu, 9 Jun 2011 11:38:38 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 05/28] rcu: Move rcu_head definition to
 types.h

On Wed, Jun 08, 2011 at 08:11:52PM -0400, Mathieu Desnoyers wrote:
> * Paul E. McKenney (paulmck@...ux.vnet.ibm.com) wrote:
> > On Wed, Jun 08, 2011 at 07:26:21PM -0400, Mathieu Desnoyers wrote:
> > > * Paul E. McKenney (paulmck@...ux.vnet.ibm.com) wrote:
> > > > Take a first step towards untangling Linux kernel header files by
> > > > placing the struct rcu_head definition into include/linux/types.h.
> > > > Once this is in place, then header files that need only rcu_head
> > > > can include types.h rather than rcupdate.h.
> > > > 
> > > > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > > 
> > > Yes! I'm suddenly feeling the temperature drop by a few degrees in
> > > #include hell ;) One detail though: I think rcupdate.h should then
> > > include types.h.
> > 
> > Glad you like it!
> > 
> > But please see below.
> > 
> > > Thanks,
> > > 
> > > Mathieu
> > > 
> > > 
> > > > ---
> > > >  include/linux/rcupdate.h |   10 +---------
> > > >  include/linux/types.h    |   10 ++++++++++
> > > >  2 files changed, 11 insertions(+), 9 deletions(-)
> > > > 
> > > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > > > index 8be0433..ad09eb8 100644
> > > > --- a/include/linux/rcupdate.h
> > > > +++ b/include/linux/rcupdate.h
> > > > @@ -64,15 +64,7 @@ static inline void rcutorture_record_progress(unsigned long vernum)
> > > >  #define ULONG_CMP_GE(a, b)	(ULONG_MAX / 2 >= (a) - (b))
> > > >  #define ULONG_CMP_LT(a, b)	(ULONG_MAX / 2 < (a) - (b))
> > > >  
> > > > -/**
> > > > - * struct rcu_head - callback structure for use with RCU
> > > > - * @next: next update requests in a list
> > > > - * @func: actual update function to call after the grace period.
> > > > - */
> > > > -struct rcu_head {
> > > > -	struct rcu_head *next;
> > > > -	void (*func)(struct rcu_head *head);
> > > > -};
> > > > +#include <linux/types.h>
> > 
> > And here you go!
> 
> Hrm, I see. Here is why I missed it: I was expecting this #include to be
> added at the top of rcupdate.h instead of being added in the middle like
> you do here. Would it be acceptable to move this #include to the top of
> the file, or is there some other obscure reason for not doing so ? (I
> feel the temperature is suddenly rising) ;-)

No reason, just laziness on my part.  Seems to work OK when I move
it up -- which is no surprise, given that types.h is probably already
included by something before rcupdate.h is reached.  So consider it
moved.

							Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ