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: (22 commits) netlink: bug fix: wrong size was calculated for vfinfo list blob netlink: bug fix: don't overrun skbs on vf_port dump xt_tee: use skb_dst_drop() netdev/fec: fix ifconfig eth0 down hang issue cnic: Fix context memory init. on 5709. drivers/net: Eliminate a NULL pointer dereference drivers/net/hamradio: Eliminate a NULL pointer dereference be2net: Patch removes redundant while statement in loop. ipv6: Add GSO support on forwarding path net: fix __neigh_event_send() vhost: fix the memory leak which will happen when memory_access_ok fails vhost-net: fix to check the return value of copy_to/from_user() correctly vhost: fix to check the return value of copy_to/from_user() correctly vhost: Fix host panic if ioctl called with wrong index net: fix lock_sock_bh/unlock_sock_bh net/iucv: Add missing spin_unlock net: ll_temac: fix checksum offload logic net: ll_temac: fix interrupt bug when interrupt 0 is used sctp: dubious bitfields in sctp_transport ipmr: off by one in __ipmr_fill_mroute() ...
This commit is contained in:
@ -1063,10 +1063,11 @@ static unsigned int first_packet_length(struct sock *sk)
|
||||
spin_unlock_bh(&rcvq->lock);
|
||||
|
||||
if (!skb_queue_empty(&list_kill)) {
|
||||
lock_sock_bh(sk);
|
||||
bool slow = lock_sock_fast(sk);
|
||||
|
||||
__skb_queue_purge(&list_kill);
|
||||
sk_mem_reclaim_partial(sk);
|
||||
unlock_sock_bh(sk);
|
||||
unlock_sock_fast(sk, slow);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -1123,6 +1124,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
||||
int peeked;
|
||||
int err;
|
||||
int is_udplite = IS_UDPLITE(sk);
|
||||
bool slow;
|
||||
|
||||
/*
|
||||
* Check any passed addresses
|
||||
@ -1197,10 +1199,10 @@ out:
|
||||
return err;
|
||||
|
||||
csum_copy_err:
|
||||
lock_sock_bh(sk);
|
||||
slow = lock_sock_fast(sk);
|
||||
if (!skb_kill_datagram(sk, skb, flags))
|
||||
UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
|
||||
unlock_sock_bh(sk);
|
||||
unlock_sock_fast(sk, slow);
|
||||
|
||||
if (noblock)
|
||||
return -EAGAIN;
|
||||
@ -1625,9 +1627,9 @@ int udp_rcv(struct sk_buff *skb)
|
||||
|
||||
void udp_destroy_sock(struct sock *sk)
|
||||
{
|
||||
lock_sock_bh(sk);
|
||||
bool slow = lock_sock_fast(sk);
|
||||
udp_flush_pending_frames(sk);
|
||||
unlock_sock_bh(sk);
|
||||
unlock_sock_fast(sk, slow);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user