From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Thu, 27 Jun 2013 05:00:04 +0800 References: <1372266127-1281-1-git-send-email-ordex@autistici.org> <1372266127-1281-3-git-send-email-ordex@autistici.org> In-Reply-To: <1372266127-1281-3-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Message-Id: <201306270500.04863.lindner_marek@yahoo.de> Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Subject: Re: [B.A.T.M.A.N.] [PATCHv9 2/3] batman-adv: add sysfs framework for VLAN Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Thursday, June 27, 2013 01:02:06 Antonio Quartulli wrote: > +static struct batadv_softif_vlan * > +batadv_kobj_to_vlan(struct batadv_priv *bat_priv, struct kobject *obj) > +{ > + struct batadv_softif_vlan *vlan; > + > + hlist_for_each_entry_rcu(vlan, &bat_priv->softif_vlan_list, list) { > + if (vlan->kobj != obj) > + continue; > + > + if (!atomic_inc_not_zero(&vlan->refcount)) > + continue; > + > + return vlan; > + } > + > + return NULL; > +} Aren't we missing a rcu_lock()/rcu_unlock() combo ? Cheers, Marek