lkml.org 
[lkml]   [2009]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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();


\
 
 \ /
  Last update: 2009-04-15 10:29    [W:0.293 / U:2.892 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site