Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0135-2.6.27.36-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(show annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 7232 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 7232 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c |
2 | index fcec2df..3990eae 100644 |
3 | --- a/drivers/isdn/gigaset/bas-gigaset.c |
4 | +++ b/drivers/isdn/gigaset/bas-gigaset.c |
5 | @@ -2140,8 +2140,16 @@ static int gigaset_initcshw(struct cardstate *cs) |
6 | struct bas_cardstate *ucs; |
7 | |
8 | cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); |
9 | - if (!ucs) |
10 | + if (!ucs) { |
11 | + pr_err("out of memory\n"); |
12 | + return 0; |
13 | + } |
14 | + ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); |
15 | + if (!ucs->int_in_buf) { |
16 | + kfree(ucs); |
17 | + pr_err("out of memory\n"); |
18 | return 0; |
19 | + } |
20 | |
21 | ucs->urb_cmd_in = NULL; |
22 | ucs->urb_cmd_out = NULL; |
23 | @@ -2236,12 +2244,6 @@ static int gigaset_probe(struct usb_interface *interface, |
24 | } |
25 | hostif = interface->cur_altsetting; |
26 | } |
27 | - ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); |
28 | - if (!ucs->int_in_buf) { |
29 | - kfree(ucs); |
30 | - pr_err("out of memory\n"); |
31 | - return 0; |
32 | - } |
33 | |
34 | /* Reject application specific interfaces |
35 | */ |
36 | diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c |
37 | index aa0bf6e..49fc60d 100644 |
38 | --- a/drivers/net/enc28j60.c |
39 | +++ b/drivers/net/enc28j60.c |
40 | @@ -919,7 +919,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) |
41 | if (netif_msg_rx_status(priv)) |
42 | enc28j60_dump_rsv(priv, __FUNCTION__, next_packet, len, rxstat); |
43 | |
44 | - if (!RSV_GETBIT(rxstat, RSV_RXOK)) { |
45 | + if (!RSV_GETBIT(rxstat, RSV_RXOK) || len > MAX_FRAMELEN) { |
46 | if (netif_msg_rx_err(priv)) |
47 | dev_err(&ndev->dev, "Rx Error (%04x)\n", rxstat); |
48 | ndev->stats.rx_errors++; |
49 | @@ -927,6 +927,8 @@ static void enc28j60_hw_rx(struct net_device *ndev) |
50 | ndev->stats.rx_crc_errors++; |
51 | if (RSV_GETBIT(rxstat, RSV_LENCHECKERR)) |
52 | ndev->stats.rx_frame_errors++; |
53 | + if (len > MAX_FRAMELEN) |
54 | + ndev->stats.rx_over_errors++; |
55 | } else { |
56 | skb = dev_alloc_skb(len + NET_IP_ALIGN); |
57 | if (!skb) { |
58 | diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c |
59 | index 7d6cf02..b429a0f 100644 |
60 | --- a/drivers/net/pcmcia/pcnet_cs.c |
61 | +++ b/drivers/net/pcmcia/pcnet_cs.c |
62 | @@ -591,7 +591,7 @@ static int pcnet_config(struct pcmcia_device *link) |
63 | } |
64 | |
65 | if ((link->conf.ConfigBase == 0x03c0) |
66 | - && (link->manf_id == 0x149) && (link->card_id = 0xc1ab)) { |
67 | + && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { |
68 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); |
69 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); |
70 | goto failed; |
71 | diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c |
72 | index bfff6b5..b97a1c9 100644 |
73 | --- a/drivers/net/wireless/p54/p54usb.c |
74 | +++ b/drivers/net/wireless/p54/p54usb.c |
75 | @@ -63,6 +63,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { |
76 | {USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/ |
77 | {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */ |
78 | {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */ |
79 | + {USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */ |
80 | {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */ |
81 | {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ |
82 | {USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */ |
83 | diff --git a/fs/inode.c b/fs/inode.c |
84 | index 7b2acc1..79777d9 100644 |
85 | --- a/fs/inode.c |
86 | +++ b/fs/inode.c |
87 | @@ -590,13 +590,15 @@ void unlock_new_inode(struct inode *inode) |
88 | } |
89 | #endif |
90 | /* |
91 | - * This is special! We do not need the spinlock |
92 | - * when clearing I_LOCK, because we're guaranteed |
93 | - * that nobody else tries to do anything about the |
94 | - * state of the inode when it is locked, as we |
95 | - * just created it (so there can be no old holders |
96 | - * that haven't tested I_LOCK). |
97 | + * This is special! We do not need the spinlock when clearing I_LOCK, |
98 | + * because we're guaranteed that nobody else tries to do anything about |
99 | + * the state of the inode when it is locked, as we just created it (so |
100 | + * there can be no old holders that haven't tested I_LOCK). |
101 | + * However we must emit the memory barrier so that other CPUs reliably |
102 | + * see the clearing of I_LOCK after the other inode initialisation has |
103 | + * completed. |
104 | */ |
105 | + smp_mb(); |
106 | WARN_ON((inode->i_state & (I_LOCK|I_NEW)) != (I_LOCK|I_NEW)); |
107 | inode->i_state &= ~(I_LOCK|I_NEW); |
108 | wake_up_inode(inode); |
109 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c |
110 | index 2885674..3a08c5a 100644 |
111 | --- a/mm/hugetlb.c |
112 | +++ b/mm/hugetlb.c |
113 | @@ -983,6 +983,7 @@ __attribute__((weak)) int alloc_bootmem_huge_page(struct hstate *h) |
114 | NODE_DATA(h->hugetlb_next_nid), |
115 | huge_page_size(h), huge_page_size(h), 0); |
116 | |
117 | + hstate_next_node(h); |
118 | if (addr) { |
119 | /* |
120 | * Use the beginning of the huge page to store the |
121 | @@ -993,7 +994,6 @@ __attribute__((weak)) int alloc_bootmem_huge_page(struct hstate *h) |
122 | if (m) |
123 | goto found; |
124 | } |
125 | - hstate_next_node(h); |
126 | nr_nodes--; |
127 | } |
128 | return 0; |
129 | diff --git a/mm/memory.c b/mm/memory.c |
130 | index 3856c36..1300b70 100644 |
131 | --- a/mm/memory.c |
132 | +++ b/mm/memory.c |
133 | @@ -2422,7 +2422,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, |
134 | goto oom_free_page; |
135 | |
136 | entry = mk_pte(page, vma->vm_page_prot); |
137 | - entry = maybe_mkwrite(pte_mkdirty(entry), vma); |
138 | + if (vma->vm_flags & VM_WRITE) |
139 | + entry = pte_mkwrite(pte_mkdirty(entry)); |
140 | |
141 | page_table = pte_offset_map_lock(mm, pmd, address, &ptl); |
142 | if (!pte_none(*page_table)) |
143 | diff --git a/mm/mmap.c b/mm/mmap.c |
144 | index d330758..8b5aa8e 100644 |
145 | --- a/mm/mmap.c |
146 | +++ b/mm/mmap.c |
147 | @@ -575,9 +575,9 @@ again: remove_next = 1 + (end > next->vm_end); |
148 | |
149 | /* |
150 | * When changing only vma->vm_end, we don't really need |
151 | - * anon_vma lock: but is that case worth optimizing out? |
152 | + * anon_vma lock. |
153 | */ |
154 | - if (vma->anon_vma) |
155 | + if (vma->anon_vma && (insert || importer || start != vma->vm_start)) |
156 | anon_vma = vma->anon_vma; |
157 | if (anon_vma) { |
158 | spin_lock(&anon_vma->lock); |
159 | diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c |
160 | index 28c7157..cd9d526 100644 |
161 | --- a/net/ax25/af_ax25.c |
162 | +++ b/net/ax25/af_ax25.c |
163 | @@ -539,7 +539,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, |
164 | if (level != SOL_AX25) |
165 | return -ENOPROTOOPT; |
166 | |
167 | - if (optlen < sizeof(int)) |
168 | + if (optlen < (int)sizeof(int)) |
169 | return -EINVAL; |
170 | |
171 | if (get_user(opt, (int __user *)optval)) |
172 | diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c |
173 | index 9abd450..f908d68 100644 |
174 | --- a/net/bridge/br_netfilter.c |
175 | +++ b/net/bridge/br_netfilter.c |
176 | @@ -358,7 +358,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb) |
177 | }, |
178 | .proto = 0, |
179 | }; |
180 | - struct in_device *in_dev = in_dev_get(dev); |
181 | + struct in_device *in_dev = __in_dev_get_rcu(dev); |
182 | |
183 | /* If err equals -EHOSTUNREACH the error is due to a |
184 | * martian destination or due to the fact that |
185 | diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c |
186 | index 4b50878..ade1ebd 100644 |
187 | --- a/net/packet/af_packet.c |
188 | +++ b/net/packet/af_packet.c |
189 | @@ -1500,7 +1500,7 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv |
190 | static int packet_getsockopt(struct socket *sock, int level, int optname, |
191 | char __user *optval, int __user *optlen) |
192 | { |
193 | - int len; |
194 | + unsigned int len; |
195 | int val; |
196 | struct sock *sk = sock->sk; |
197 | struct packet_sock *po = pkt_sk(sk); |
198 | @@ -1513,7 +1513,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname, |
199 | if (get_user(len, optlen)) |
200 | return -EFAULT; |
201 | |
202 | - if (len < 0) |
203 | + if ((int)len < 0) |
204 | return -EINVAL; |
205 | |
206 | switch(optname) { |