diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-04 10:16:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-04 10:16:00 -0400 |
commit | 0e833d8cfcb52b5ee3ead22cabbab81dea32c3f0 (patch) | |
tree | 0c64533ba9181c014a4b2dcda75c273ae0437dd6 /net/caif/chnl_net.c | |
parent | 4f1ba49efafccbc73017f824efa2505c81b247cd (diff) | |
parent | 7b29dc21ea084be7ddfb536994a9cfae95337690 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
tg3: Fix tg3_skb_error_unmap()
net: tracepoint of net_dev_xmit sees freed skb and causes panic
drivers/net/can/flexcan.c: add missing clk_put
net: dm9000: Get the chip in a known good state before enabling interrupts
drivers/net/davinci_emac.c: add missing clk_put
af-packet: Add flag to distinguish VID 0 from no-vlan.
caif: Fix race when conditionally taking rtnl lock
usbnet/cdc_ncm: add missing .reset_resume hook
vlan: fix typo in vlan_dev_hard_start_xmit()
net/ipv4: Check for mistakenly passed in non-IPv4 address
iwl4965: correctly validate temperature value
bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
ath9k: fix two more bugs in tx power
cfg80211: don't drop p2p probe responses
Revert "net: fix section mismatches"
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
sctp: stop pending timers and purge queues when peer restart asoc
drivers/net: ks8842 Fix crash on received packet when in PIO mode.
ip_options_compile: properly handle unaligned pointer
iwlagn: fix incorrect PCI subsystem id for 6150 devices
...
Diffstat (limited to 'net/caif/chnl_net.c')
-rw-r--r-- | net/caif/chnl_net.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 649ebacaf6bc..adbb424403d4 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c | |||
@@ -139,17 +139,14 @@ static void close_work(struct work_struct *work) | |||
139 | struct chnl_net *dev = NULL; | 139 | struct chnl_net *dev = NULL; |
140 | struct list_head *list_node; | 140 | struct list_head *list_node; |
141 | struct list_head *_tmp; | 141 | struct list_head *_tmp; |
142 | /* May be called with or without RTNL lock held */ | 142 | |
143 | int islocked = rtnl_is_locked(); | 143 | rtnl_lock(); |
144 | if (!islocked) | ||
145 | rtnl_lock(); | ||
146 | list_for_each_safe(list_node, _tmp, &chnl_net_list) { | 144 | list_for_each_safe(list_node, _tmp, &chnl_net_list) { |
147 | dev = list_entry(list_node, struct chnl_net, list_field); | 145 | dev = list_entry(list_node, struct chnl_net, list_field); |
148 | if (dev->state == CAIF_SHUTDOWN) | 146 | if (dev->state == CAIF_SHUTDOWN) |
149 | dev_close(dev->netdev); | 147 | dev_close(dev->netdev); |
150 | } | 148 | } |
151 | if (!islocked) | 149 | rtnl_unlock(); |
152 | rtnl_unlock(); | ||
153 | } | 150 | } |
154 | static DECLARE_WORK(close_worker, close_work); | 151 | static DECLARE_WORK(close_worker, close_work); |
155 | 152 | ||