Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219900
b: refs/heads/master
c: 16f9530
h: refs/heads/master
v: v3
  • Loading branch information
Sven Eckelmann authored and Greg Kroah-Hartman committed Sep 20, 2010
1 parent 021d018 commit 9f9bcb7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 952c699c06f562b07dba4b1f91dfc02de928545d
refs/heads/master: 16f9530e99f5eb35dd1adafbae854dd94f8d3751
1 change: 0 additions & 1 deletion trunk/drivers/staging/batman-adv/TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
* Rework usage of RCU
- don't leak pointers from rcu out of rcu critical area which may
get freed
- check were synchronize_rcu must be used
- go through Documentation/RCU/checklist.txt
* Request a new review
* Process the comments from the review
Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/staging/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,6 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
return NULL;
}

static void hardif_free_interface(struct rcu_head *rcu)
{
struct batman_if *batman_if = container_of(rcu, struct batman_if, rcu);

kfree(batman_if);
}

static void hardif_remove_interface(struct batman_if *batman_if)
{
/* first deactivate interface */
Expand All @@ -438,9 +431,10 @@ static void hardif_remove_interface(struct batman_if *batman_if)

/* caller must take if_list_lock */
list_del_rcu(&batman_if->list);
synchronize_rcu();
sysfs_del_hardif(&batman_if->hardif_obj);
dev_put(batman_if->net_dev);
call_rcu(&batman_if->rcu, hardif_free_interface);
kfree(batman_if);
}

void hardif_remove_interfaces(void)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/batman-adv/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ struct batman_if {
unsigned char *packet_buff;
int packet_len;
struct kobject *hardif_obj;
struct rcu_head rcu;
struct packet_type batman_adv_ptype;
struct net_device *soft_iface;
};
Expand Down

0 comments on commit 9f9bcb7

Please sign in to comment.