diff options
author | Praneeth Bajjuri | 2013-04-05 18:05:41 -0500 |
---|---|---|
committer | Praneeth Bajjuri | 2013-04-05 18:05:41 -0500 |
commit | 9207a84be6b2c663c476d2eacb74136e588758be (patch) | |
tree | 8cf302fe41b4541cc4df4195f4cb72d1b32fddc6 /net | |
parent | 78203641d6546f5df333ba0b0336b692cfbb2e4f (diff) | |
parent | 043750cbb1e82aa152b11240cce51e0756dddf5f (diff) | |
download | kernel-video-9207a84be6b2c663c476d2eacb74136e588758be.tar.gz kernel-video-9207a84be6b2c663c476d2eacb74136e588758be.tar.xz kernel-video-9207a84be6b2c663c476d2eacb74136e588758be.zip |
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
* origin/p-ti-linux-3.8.y: (146 commits)
ARM: omap2plus_defconfig: enable ocp2scp driver
Linux 3.8.6
bonding: get netdev_rx_handler_unregister out of locks
smsc75xx: fix jumbo frame support
pch_gbe: fix ip_summed checksum reporting on rx
net: fq_codel: Fix off-by-one error
net: fix the use of this_cpu_ptr
net: ethernet: cpsw: fix erroneous condition in error check
net: add a synchronize_net() in netdev_rx_handler_unregister()
ks8851: Fix interpretation of rxlen field.
ipv6: don't accept node local multicast traffic from the wire
ipv6: don't accept multicast traffic with scope 0
ipv6: fix bad free of addrconf_init_net
fec: Fix the build as module
DM9000B: driver initialization upgrade
atl1e: drop pci-msi support because of packet corruption
aoe: reserve enough headroom on skbs
net: fix *_DIAG_MAX constants
drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue
drivers: net: ethernet: davinci_emac: use netif_wake_queue() while restarting tx queue
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan.c | 14 | ||||
-rw-r--r-- | net/bluetooth/sco.c | 1 | ||||
-rw-r--r-- | net/core/dev.c | 7 | ||||
-rw-r--r-- | net/core/flow.c | 2 | ||||
-rw-r--r-- | net/core/scm.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 7 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 7 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 26 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 21 | ||||
-rw-r--r-- | net/irda/af_irda.c | 6 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 4 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 12 | ||||
-rw-r--r-- | net/netlink/genetlink.c | 1 | ||||
-rw-r--r-- | net/sched/sch_fq_codel.c | 2 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 9 | ||||
-rw-r--r-- | net/unix/af_unix.c | 7 |
16 files changed, 86 insertions, 44 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index a292e8050ef..acc74ad496e 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -86,13 +86,6 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head) | |||
86 | 86 | ||
87 | grp = &vlan_info->grp; | 87 | grp = &vlan_info->grp; |
88 | 88 | ||
89 | /* Take it out of our own structures, but be sure to interlock with | ||
90 | * HW accelerating devices or SW vlan input packet processing if | ||
91 | * VLAN is not 0 (leave it there for 802.1p). | ||
92 | */ | ||
93 | if (vlan_id) | ||
94 | vlan_vid_del(real_dev, vlan_id); | ||
95 | |||
96 | grp->nr_vlan_devs--; | 89 | grp->nr_vlan_devs--; |
97 | 90 | ||
98 | if (vlan->flags & VLAN_FLAG_GVRP) | 91 | if (vlan->flags & VLAN_FLAG_GVRP) |
@@ -108,6 +101,13 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head) | |||
108 | if (grp->nr_vlan_devs == 0) | 101 | if (grp->nr_vlan_devs == 0) |
109 | vlan_gvrp_uninit_applicant(real_dev); | 102 | vlan_gvrp_uninit_applicant(real_dev); |
110 | 103 | ||
104 | /* Take it out of our own structures, but be sure to interlock with | ||
105 | * HW accelerating devices or SW vlan input packet processing if | ||
106 | * VLAN is not 0 (leave it there for 802.1p). | ||
107 | */ | ||
108 | if (vlan_id) | ||
109 | vlan_vid_del(real_dev, vlan_id); | ||
110 | |||
111 | /* Get rid of the vlan's reference to real_dev */ | 111 | /* Get rid of the vlan's reference to real_dev */ |
112 | dev_put(real_dev); | 112 | dev_put(real_dev); |
113 | } | 113 | } |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index cb25067d100..f54d7435819 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -364,6 +364,7 @@ static void __sco_sock_close(struct sock *sk) | |||
364 | sco_chan_del(sk, ECONNRESET); | 364 | sco_chan_del(sk, ECONNRESET); |
365 | break; | 365 | break; |
366 | 366 | ||
367 | case BT_CONNECT2: | ||
367 | case BT_CONNECT: | 368 | case BT_CONNECT: |
368 | case BT_DISCONN: | 369 | case BT_DISCONN: |
369 | sco_chan_del(sk, ECONNRESET); | 370 | sco_chan_del(sk, ECONNRESET); |
diff --git a/net/core/dev.c b/net/core/dev.c index 1339f77e389..5d9c43dca73 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1591,7 +1591,6 @@ void net_enable_timestamp(void) | |||
1591 | return; | 1591 | return; |
1592 | } | 1592 | } |
1593 | #endif | 1593 | #endif |
1594 | WARN_ON(in_interrupt()); | ||
1595 | static_key_slow_inc(&netstamp_needed); | 1594 | static_key_slow_inc(&netstamp_needed); |
1596 | } | 1595 | } |
1597 | EXPORT_SYMBOL(net_enable_timestamp); | 1596 | EXPORT_SYMBOL(net_enable_timestamp); |
@@ -3277,6 +3276,7 @@ int netdev_rx_handler_register(struct net_device *dev, | |||
3277 | if (dev->rx_handler) | 3276 | if (dev->rx_handler) |
3278 | return -EBUSY; | 3277 | return -EBUSY; |
3279 | 3278 | ||
3279 | /* Note: rx_handler_data must be set before rx_handler */ | ||
3280 | rcu_assign_pointer(dev->rx_handler_data, rx_handler_data); | 3280 | rcu_assign_pointer(dev->rx_handler_data, rx_handler_data); |
3281 | rcu_assign_pointer(dev->rx_handler, rx_handler); | 3281 | rcu_assign_pointer(dev->rx_handler, rx_handler); |
3282 | 3282 | ||
@@ -3297,6 +3297,11 @@ void netdev_rx_handler_unregister(struct net_device *dev) | |||
3297 | 3297 | ||
3298 | ASSERT_RTNL(); | 3298 | ASSERT_RTNL(); |
3299 | RCU_INIT_POINTER(dev->rx_handler, NULL); | 3299 | RCU_INIT_POINTER(dev->rx_handler, NULL); |
3300 | /* a reader seeing a non NULL rx_handler in a rcu_read_lock() | ||
3301 | * section has a guarantee to see a non NULL rx_handler_data | ||
3302 | * as well. | ||
3303 | */ | ||
3304 | synchronize_net(); | ||
3300 | RCU_INIT_POINTER(dev->rx_handler_data, NULL); | 3305 | RCU_INIT_POINTER(dev->rx_handler_data, NULL); |
3301 | } | 3306 | } |
3302 | EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); | 3307 | EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); |
diff --git a/net/core/flow.c b/net/core/flow.c index b0901ee5a00..3bad82461f3 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -329,7 +329,7 @@ static void flow_cache_flush_per_cpu(void *data) | |||
329 | struct flow_flush_info *info = data; | 329 | struct flow_flush_info *info = data; |
330 | struct tasklet_struct *tasklet; | 330 | struct tasklet_struct *tasklet; |
331 | 331 | ||
332 | tasklet = this_cpu_ptr(&info->cache->percpu->flush_tasklet); | 332 | tasklet = &this_cpu_ptr(info->cache->percpu)->flush_tasklet; |
333 | tasklet->data = (unsigned long)info; | 333 | tasklet->data = (unsigned long)info; |
334 | tasklet_schedule(tasklet); | 334 | tasklet_schedule(tasklet); |
335 | } | 335 | } |
diff --git a/net/core/scm.c b/net/core/scm.c index 905dcc6ad1e..2dc6cdaaae8 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/security.h> | 26 | #include <linux/security.h> |
27 | #include <linux/pid_namespace.h> | ||
27 | #include <linux/pid.h> | 28 | #include <linux/pid.h> |
28 | #include <linux/nsproxy.h> | 29 | #include <linux/nsproxy.h> |
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
@@ -52,7 +53,8 @@ static __inline__ int scm_check_creds(struct ucred *creds) | |||
52 | if (!uid_valid(uid) || !gid_valid(gid)) | 53 | if (!uid_valid(uid) || !gid_valid(gid)) |
53 | return -EINVAL; | 54 | return -EINVAL; |
54 | 55 | ||
55 | if ((creds->pid == task_tgid_vnr(current) || nsown_capable(CAP_SYS_ADMIN)) && | 56 | if ((creds->pid == task_tgid_vnr(current) || |
57 | ns_capable(current->nsproxy->pid_ns->user_ns, CAP_SYS_ADMIN)) && | ||
56 | ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || | 58 | ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || |
57 | uid_eq(uid, cred->suid)) || nsown_capable(CAP_SETUID)) && | 59 | uid_eq(uid, cred->suid)) || nsown_capable(CAP_SETUID)) && |
58 | ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || | 60 | ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 66702d33f70..9841a716370 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2064,11 +2064,8 @@ void tcp_enter_loss(struct sock *sk, int how) | |||
2064 | if (tcp_is_reno(tp)) | 2064 | if (tcp_is_reno(tp)) |
2065 | tcp_reset_reno_sack(tp); | 2065 | tcp_reset_reno_sack(tp); |
2066 | 2066 | ||
2067 | if (!how) { | 2067 | tp->undo_marker = tp->snd_una; |
2068 | /* Push undo marker, if it was plain RTO and nothing | 2068 | if (how) { |
2069 | * was retransmitted. */ | ||
2070 | tp->undo_marker = tp->snd_una; | ||
2071 | } else { | ||
2072 | tp->sacked_out = 0; | 2069 | tp->sacked_out = 0; |
2073 | tp->fackets_out = 0; | 2070 | tp->fackets_out = 0; |
2074 | } | 2071 | } |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c36c6c2599b..17d659e6fb6 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1809,8 +1809,11 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb) | |||
1809 | goto send_now; | 1809 | goto send_now; |
1810 | } | 1810 | } |
1811 | 1811 | ||
1812 | /* Ok, it looks like it is advisable to defer. */ | 1812 | /* Ok, it looks like it is advisable to defer. |
1813 | tp->tso_deferred = 1 | (jiffies << 1); | 1813 | * Do not rearm the timer if already set to not break TCP ACK clocking. |
1814 | */ | ||
1815 | if (!tp->tso_deferred) | ||
1816 | tp->tso_deferred = 1 | (jiffies << 1); | ||
1814 | 1817 | ||
1815 | return true; | 1818 | return true; |
1816 | 1819 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 1b5d8cb9b12..a36d17e4008 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4787,26 +4787,20 @@ static void addrconf_sysctl_unregister(struct inet6_dev *idev) | |||
4787 | 4787 | ||
4788 | static int __net_init addrconf_init_net(struct net *net) | 4788 | static int __net_init addrconf_init_net(struct net *net) |
4789 | { | 4789 | { |
4790 | int err; | 4790 | int err = -ENOMEM; |
4791 | struct ipv6_devconf *all, *dflt; | 4791 | struct ipv6_devconf *all, *dflt; |
4792 | 4792 | ||
4793 | err = -ENOMEM; | 4793 | all = kmemdup(&ipv6_devconf, sizeof(ipv6_devconf), GFP_KERNEL); |
4794 | all = &ipv6_devconf; | 4794 | if (all == NULL) |
4795 | dflt = &ipv6_devconf_dflt; | 4795 | goto err_alloc_all; |
4796 | 4796 | ||
4797 | if (!net_eq(net, &init_net)) { | 4797 | dflt = kmemdup(&ipv6_devconf_dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL); |
4798 | all = kmemdup(all, sizeof(ipv6_devconf), GFP_KERNEL); | 4798 | if (dflt == NULL) |
4799 | if (all == NULL) | 4799 | goto err_alloc_dflt; |
4800 | goto err_alloc_all; | ||
4801 | 4800 | ||
4802 | dflt = kmemdup(dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL); | 4801 | /* these will be inherited by all namespaces */ |
4803 | if (dflt == NULL) | 4802 | dflt->autoconf = ipv6_defaults.autoconf; |
4804 | goto err_alloc_dflt; | 4803 | dflt->disable_ipv6 = ipv6_defaults.disable_ipv6; |
4805 | } else { | ||
4806 | /* these will be inherited by all namespaces */ | ||
4807 | dflt->autoconf = ipv6_defaults.autoconf; | ||
4808 | dflt->disable_ipv6 = ipv6_defaults.disable_ipv6; | ||
4809 | } | ||
4810 | 4804 | ||
4811 | net->ipv6.devconf_all = all; | 4805 | net->ipv6.devconf_all = all; |
4812 | net->ipv6.devconf_dflt = dflt; | 4806 | net->ipv6.devconf_dflt = dflt; |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index b1968521991..dee9964f9cb 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -118,6 +118,27 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
118 | ipv6_addr_loopback(&hdr->daddr)) | 118 | ipv6_addr_loopback(&hdr->daddr)) |
119 | goto err; | 119 | goto err; |
120 | 120 | ||
121 | /* RFC4291 Errata ID: 3480 | ||
122 | * Interface-Local scope spans only a single interface on a | ||
123 | * node and is useful only for loopback transmission of | ||
124 | * multicast. Packets with interface-local scope received | ||
125 | * from another node must be discarded. | ||
126 | */ | ||
127 | if (!(skb->pkt_type == PACKET_LOOPBACK || | ||
128 | dev->flags & IFF_LOOPBACK) && | ||
129 | ipv6_addr_is_multicast(&hdr->daddr) && | ||
130 | IPV6_ADDR_MC_SCOPE(&hdr->daddr) == 1) | ||
131 | goto err; | ||
132 | |||
133 | /* RFC4291 2.7 | ||
134 | * Nodes must not originate a packet to a multicast address whose scope | ||
135 | * field contains the reserved value 0; if such a packet is received, it | ||
136 | * must be silently dropped. | ||
137 | */ | ||
138 | if (ipv6_addr_is_multicast(&hdr->daddr) && | ||
139 | IPV6_ADDR_MC_SCOPE(&hdr->daddr) == 0) | ||
140 | goto err; | ||
141 | |||
121 | /* | 142 | /* |
122 | * RFC4291 2.7 | 143 | * RFC4291 2.7 |
123 | * Multicast addresses must not be used as source addresses in IPv6 | 144 | * Multicast addresses must not be used as source addresses in IPv6 |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index b833677d83d..4d04105a3f0 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -2584,8 +2584,10 @@ bed: | |||
2584 | NULL, NULL, NULL); | 2584 | NULL, NULL, NULL); |
2585 | 2585 | ||
2586 | /* Check if the we got some results */ | 2586 | /* Check if the we got some results */ |
2587 | if (!self->cachedaddr) | 2587 | if (!self->cachedaddr) { |
2588 | return -EAGAIN; /* Didn't find any devices */ | 2588 | err = -EAGAIN; /* Didn't find any devices */ |
2589 | goto out; | ||
2590 | } | ||
2589 | daddr = self->cachedaddr; | 2591 | daddr = self->cachedaddr; |
2590 | /* Cleanup */ | 2592 | /* Cleanup */ |
2591 | self->cachedaddr = 0; | 2593 | self->cachedaddr = 0; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 27d1ec1917e..2c6e4788dde 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3423,6 +3423,10 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, | |||
3423 | ret = 0; | 3423 | ret = 0; |
3424 | 3424 | ||
3425 | out: | 3425 | out: |
3426 | /* don't print the message below for VHT mismatch if VHT is disabled */ | ||
3427 | if (ret & IEEE80211_STA_DISABLE_VHT) | ||
3428 | vht_chandef = *chandef; | ||
3429 | |||
3426 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, | 3430 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, |
3427 | IEEE80211_CHAN_DISABLED)) { | 3431 | IEEE80211_CHAN_DISABLED)) { |
3428 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { | 3432 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 227233c3ff7..b96f449b99a 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -761,6 +761,7 @@ int __must_check __sta_info_destroy(struct sta_info *sta) | |||
761 | struct ieee80211_local *local; | 761 | struct ieee80211_local *local; |
762 | struct ieee80211_sub_if_data *sdata; | 762 | struct ieee80211_sub_if_data *sdata; |
763 | int ret, i; | 763 | int ret, i; |
764 | bool have_key = false; | ||
764 | 765 | ||
765 | might_sleep(); | 766 | might_sleep(); |
766 | 767 | ||
@@ -788,12 +789,19 @@ int __must_check __sta_info_destroy(struct sta_info *sta) | |||
788 | list_del_rcu(&sta->list); | 789 | list_del_rcu(&sta->list); |
789 | 790 | ||
790 | mutex_lock(&local->key_mtx); | 791 | mutex_lock(&local->key_mtx); |
791 | for (i = 0; i < NUM_DEFAULT_KEYS; i++) | 792 | for (i = 0; i < NUM_DEFAULT_KEYS; i++) { |
792 | __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i])); | 793 | __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i])); |
793 | if (sta->ptk) | 794 | have_key = true; |
795 | } | ||
796 | if (sta->ptk) { | ||
794 | __ieee80211_key_free(key_mtx_dereference(local, sta->ptk)); | 797 | __ieee80211_key_free(key_mtx_dereference(local, sta->ptk)); |
798 | have_key = true; | ||
799 | } | ||
795 | mutex_unlock(&local->key_mtx); | 800 | mutex_unlock(&local->key_mtx); |
796 | 801 | ||
802 | if (!have_key) | ||
803 | synchronize_net(); | ||
804 | |||
797 | sta->dead = true; | 805 | sta->dead = true; |
798 | 806 | ||
799 | local->num_sta--; | 807 | local->num_sta--; |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index f2aabb6f410..5a55be3f17a 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family, | |||
142 | int err = 0; | 142 | int err = 0; |
143 | 143 | ||
144 | BUG_ON(grp->name[0] == '\0'); | 144 | BUG_ON(grp->name[0] == '\0'); |
145 | BUG_ON(memchr(grp->name, '\0', GENL_NAMSIZ) == NULL); | ||
145 | 146 | ||
146 | genl_lock(); | 147 | genl_lock(); |
147 | 148 | ||
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c index 4e606fcb253..55786283a3d 100644 --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c | |||
@@ -195,7 +195,7 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
195 | flow->deficit = q->quantum; | 195 | flow->deficit = q->quantum; |
196 | flow->dropped = 0; | 196 | flow->dropped = 0; |
197 | } | 197 | } |
198 | if (++sch->q.qlen < sch->limit) | 198 | if (++sch->q.qlen <= sch->limit) |
199 | return NET_XMIT_SUCCESS; | 199 | return NET_XMIT_SUCCESS; |
200 | 200 | ||
201 | q->drop_overlimit++; | 201 | q->drop_overlimit++; |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index fb20f25ddec..f8529fc8e54 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -180,6 +180,8 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, | |||
180 | list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]); | 180 | list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]); |
181 | task->tk_waitqueue = queue; | 181 | task->tk_waitqueue = queue; |
182 | queue->qlen++; | 182 | queue->qlen++; |
183 | /* barrier matches the read in rpc_wake_up_task_queue_locked() */ | ||
184 | smp_wmb(); | ||
183 | rpc_set_queued(task); | 185 | rpc_set_queued(task); |
184 | 186 | ||
185 | dprintk("RPC: %5u added to queue %p \"%s\"\n", | 187 | dprintk("RPC: %5u added to queue %p \"%s\"\n", |
@@ -430,8 +432,11 @@ static void __rpc_do_wake_up_task(struct rpc_wait_queue *queue, struct rpc_task | |||
430 | */ | 432 | */ |
431 | static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct rpc_task *task) | 433 | static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct rpc_task *task) |
432 | { | 434 | { |
433 | if (RPC_IS_QUEUED(task) && task->tk_waitqueue == queue) | 435 | if (RPC_IS_QUEUED(task)) { |
434 | __rpc_do_wake_up_task(queue, task); | 436 | smp_rmb(); |
437 | if (task->tk_waitqueue == queue) | ||
438 | __rpc_do_wake_up_task(queue, task); | ||
439 | } | ||
435 | } | 440 | } |
436 | 441 | ||
437 | /* | 442 | /* |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5b5c876c80e..b45eb6553ee 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -384,7 +384,7 @@ static void unix_sock_destructor(struct sock *sk) | |||
384 | #endif | 384 | #endif |
385 | } | 385 | } |
386 | 386 | ||
387 | static int unix_release_sock(struct sock *sk, int embrion) | 387 | static void unix_release_sock(struct sock *sk, int embrion) |
388 | { | 388 | { |
389 | struct unix_sock *u = unix_sk(sk); | 389 | struct unix_sock *u = unix_sk(sk); |
390 | struct path path; | 390 | struct path path; |
@@ -453,8 +453,6 @@ static int unix_release_sock(struct sock *sk, int embrion) | |||
453 | 453 | ||
454 | if (unix_tot_inflight) | 454 | if (unix_tot_inflight) |
455 | unix_gc(); /* Garbage collect fds */ | 455 | unix_gc(); /* Garbage collect fds */ |
456 | |||
457 | return 0; | ||
458 | } | 456 | } |
459 | 457 | ||
460 | static void init_peercred(struct sock *sk) | 458 | static void init_peercred(struct sock *sk) |
@@ -701,9 +699,10 @@ static int unix_release(struct socket *sock) | |||
701 | if (!sk) | 699 | if (!sk) |
702 | return 0; | 700 | return 0; |
703 | 701 | ||
702 | unix_release_sock(sk, 0); | ||
704 | sock->sk = NULL; | 703 | sock->sk = NULL; |
705 | 704 | ||
706 | return unix_release_sock(sk, 0); | 705 | return 0; |
707 | } | 706 | } |
708 | 707 | ||
709 | static int unix_autobind(struct socket *sock) | 708 | static int unix_autobind(struct socket *sock) |