direct-io.hg

view patches/linux-2.6.11/udp-frag.patch @ 5617:22d7dda0e38d

bitkeeper revision 1.1782 (42c3a8e76Lioy1FVEJFTaTkbYVBy7Q)

[PATCH] Use copy_from_user when accessing guest_pt[]

Use copy_from_user when accessing guest_pt[]

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author arun.sharma@intel.com[kaf24]
date Thu Jun 30 08:10:15 2005 +0000 (2005-06-30)
parents 0c6cce9d9b82
children 56a63f9f378f
line source
1 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
2 --- a/net/ipv4/udp.c
3 +++ b/net/ipv4/udp.c
4 @@ -738,7 +738,7 @@ int udp_ioctl(struct sock *sk, int cmd,
5 unsigned long amount;
7 amount = 0;
8 - spin_lock_irq(&sk->sk_receive_queue.lock);
9 + spin_lock_bh(&sk->sk_receive_queue.lock);
10 skb = skb_peek(&sk->sk_receive_queue);
11 if (skb != NULL) {
12 /*
13 @@ -748,7 +748,7 @@ int udp_ioctl(struct sock *sk, int cmd,
14 */
15 amount = skb->len - sizeof(struct udphdr);
16 }
17 - spin_unlock_irq(&sk->sk_receive_queue.lock);
18 + spin_unlock_bh(&sk->sk_receive_queue.lock);
19 return put_user(amount, (int __user *)arg);
20 }
22 @@ -848,12 +848,12 @@ csum_copy_err:
23 /* Clear queue. */
24 if (flags&MSG_PEEK) {
25 int clear = 0;
26 - spin_lock_irq(&sk->sk_receive_queue.lock);
27 + spin_lock_bh(&sk->sk_receive_queue.lock);
28 if (skb == skb_peek(&sk->sk_receive_queue)) {
29 __skb_unlink(skb, &sk->sk_receive_queue);
30 clear = 1;
31 }
32 - spin_unlock_irq(&sk->sk_receive_queue.lock);
33 + spin_unlock_bh(&sk->sk_receive_queue.lock);
34 if (clear)
35 kfree_skb(skb);
36 }
37 @@ -1334,7 +1334,7 @@ unsigned int udp_poll(struct file *file,
38 struct sk_buff_head *rcvq = &sk->sk_receive_queue;
39 struct sk_buff *skb;
41 - spin_lock_irq(&rcvq->lock);
42 + spin_lock_bh(&rcvq->lock);
43 while ((skb = skb_peek(rcvq)) != NULL) {
44 if (udp_checksum_complete(skb)) {
45 UDP_INC_STATS_BH(UDP_MIB_INERRORS);
46 @@ -1345,7 +1345,7 @@ unsigned int udp_poll(struct file *file,
47 break;
48 }
49 }
50 - spin_unlock_irq(&rcvq->lock);
51 + spin_unlock_bh(&rcvq->lock);
53 /* nothing to see, move along */
54 if (skb == NULL)