summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/ip_queue.c6
-rw-r--r--net/ipv6/ip6_flowlabel.c7
-rw-r--r--net/ipx/af_spx.c6
3 files changed, 13 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 2ac8b22e2..4f8a8de07 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -263,11 +263,13 @@ static int ipq_receive_peer(ipq_queue_t *q, ipq_peer_msg_t *m,
{
int status = 0;
+ int busy;
spin_lock_bh(&q->lock);
- if (q->terminate || q->flushing)
- return -EBUSY;
+ busy = (q->terminate || q->flushing);
spin_unlock_bh(&q->lock);
+ if (busy)
+ return -EBUSY;
if (len < sizeof(ipq_peer_msg_t))
return -EINVAL;
switch (type) {
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index 4dd29b60e..c87c1d447 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -436,8 +436,11 @@ int ipv6_flowlabel_opt(struct sock *sk, char *optval, int optlen)
case IPV6_FL_A_RENEW:
read_lock_bh(&ip6_sk_fl_lock);
for (sfl = np->ipv6_fl_list; sfl; sfl = sfl->next) {
- if (sfl->fl->label == freq.flr_label)
- return fl6_renew(sfl->fl, freq.flr_linger, freq.flr_expires);
+ if (sfl->fl->label == freq.flr_label) {
+ err = fl6_renew(sfl->fl, freq.flr_linger, freq.flr_expires);
+ read_unlock_bh(&ip6_sk_fl_lock);
+ return err;
+ }
}
read_unlock_bh(&ip6_sk_fl_lock);
diff --git a/net/ipx/af_spx.c b/net/ipx/af_spx.c
index dc8623aad..fa90429f9 100644
--- a/net/ipx/af_spx.c
+++ b/net/ipx/af_spx.c
@@ -441,8 +441,10 @@ static int spx_transmit(struct sock *sk, struct sk_buff *skb, int type, int len)
save_flags(flags);
cli();
skb = sock_alloc_send_skb(sk, size, 1, 0, &err);
- if(skb == NULL)
+ if(skb == NULL) {
+ restore_flags(flags);
return (-ENOMEM);
+ }
skb_reserve(skb, offset);
skb->h.raw = skb->nh.raw = skb_put(skb,sizeof(struct ipxspxhdr));
restore_flags(flags);
@@ -741,9 +743,9 @@ static int spx_sendmsg(struct socket *sock, struct msghdr *msg, int len,
cli();
skb = sock_alloc_send_skb(sk, size, 0, flags&MSG_DONTWAIT, &err);
+ sti();
if(skb == NULL)
return (err);
- sti();
skb->sk = sk;
skb_reserve(skb, offset);