[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49E59A1C.9030108@cn.fujitsu.com>
Date: Wed, 15 Apr 2009 16:26:04 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Jiri Pirko <jpirko@...hat.com>
CC: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
jgarzik@...ox.com, davem@...emloft.net,
shemminger@...ux-foundation.org, bridge@...ts.linux-foundation.org,
fubar@...ibm.com, bonding-devel@...ts.sourceforge.net,
kaber@...sh.net, mschmidt@...hat.com, dada1@...mosbay.com,
ivecera@...hat.com
Subject: Re: [PATCH 1/3] net: introduce a list of device addresses dev_addr_list
> +static int __hw_addr_add_ii(struct list_head *list, unsigned char *addr,
> + int addr_len, int ignore_index)
> +{
> + struct netdev_hw_addr *ha;
> + int i = 0;
> +
> + if (addr_len > MAX_ADDR_LEN)
> + return -EINVAL;
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(ha, list, list) {
> + if (i++ != ignore_index &&
> + !memcmp(ha->addr, addr, addr_len)) {
> + ha->refcount++;
> + return 0;
missing rcu_read_unlock() ?
> + }
> + }
> + rcu_read_unlock();
--
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