LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH net-next 3/6] ipvs: fix sparse warnings in lblc and lblcr

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH net-next 3/6] ipvs: fix sparse warnings in lblc and lblcr
Cc: lvs-devel@xxxxxxxxxxxxxxx, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Fri, 19 Apr 2013 08:53:40 +0900
On Thu, Apr 18, 2013 at 10:46:57PM +0300, Julian Anastasov wrote:
> 
>       Hello,
> 
> On Thu, 18 Apr 2013, Simon Horman wrote:
> 
> > On Wed, Apr 17, 2013 at 11:50:47PM +0300, Julian Anastasov wrote:
> > >   kbuild test robot reports for sparse warnings in
> > > commits c2a4ffb70eef39 ("ipvs: convert lblc scheduler to rcu")
> > > and c5549571f975ab ("ipvs: convert lblcr scheduler to rcu").
> > > 
> > >   Fix it by removing extra __rcu annotation.
> > 
> > Hi Julian,
> > 
> > perhaps only for my benefit, but could you explain
> > why the annotations are unnecessary?
> 
>       IMHO, because __rcu should be used only for
> pointers, not for struct hlist_head. The *list*_rcu
> methods enforce __rcu internally for the pointers.

Thanks, I have queued-up the change in ipvs-next.

> 
> > > Signed-off-by: Julian Anastasov <ja@xxxxxx>
> > > ---
> > >  net/netfilter/ipvs/ip_vs_lblc.c  |    2 +-
> > >  net/netfilter/ipvs/ip_vs_lblcr.c |    2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/net/netfilter/ipvs/ip_vs_lblc.c 
> > > b/net/netfilter/ipvs/ip_vs_lblc.c
> > > index b2cc252..5ea26bd 100644
> > > --- a/net/netfilter/ipvs/ip_vs_lblc.c
> > > +++ b/net/netfilter/ipvs/ip_vs_lblc.c
> > > @@ -104,7 +104,7 @@ struct ip_vs_lblc_entry {
> > >   */
> > >  struct ip_vs_lblc_table {
> > >   struct rcu_head         rcu_head;
> > > - struct hlist_head __rcu bucket[IP_VS_LBLC_TAB_SIZE];  /* hash bucket */
> > > + struct hlist_head       bucket[IP_VS_LBLC_TAB_SIZE];  /* hash bucket */
> > >   struct timer_list       periodic_timer; /* collect stale entries */
> > >   atomic_t                entries;        /* number of entries */
> > >   int                     max_size;       /* maximum size of entries */
> > > diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c 
> > > b/net/netfilter/ipvs/ip_vs_lblcr.c
> > > index feb9656..50123c2 100644
> > > --- a/net/netfilter/ipvs/ip_vs_lblcr.c
> > > +++ b/net/netfilter/ipvs/ip_vs_lblcr.c
> > > @@ -284,7 +284,7 @@ struct ip_vs_lblcr_entry {
> > >   */
> > >  struct ip_vs_lblcr_table {
> > >   struct rcu_head         rcu_head;
> > > - struct hlist_head __rcu bucket[IP_VS_LBLCR_TAB_SIZE];  /* hash bucket */
> > > + struct hlist_head       bucket[IP_VS_LBLCR_TAB_SIZE];  /* hash bucket */
> > >   atomic_t                entries;        /* number of entries */
> > >   int                     max_size;       /* maximum size of entries */
> > >   struct timer_list       periodic_timer; /* collect stale entries */
> > > -- 
> > > 1.7.3.4
> 
> Regards
> 
> --
> Julian Anastasov <ja@xxxxxx>
> 
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>