/[linux-patches]/genpatches-2.6/tags/3.0-30/1024_linux-3.0.25.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1024_linux-3.0.25.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (23 months ago) by mpagano
File size: 40862 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index 7526032..0fb2b58 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 24
9 +SUBLEVEL = 25
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
14 index 7547f57..0260051 100644
15 --- a/arch/s390/kernel/setup.c
16 +++ b/arch/s390/kernel/setup.c
17 @@ -56,6 +56,7 @@
18 #include <asm/ptrace.h>
19 #include <asm/sections.h>
20 #include <asm/ebcdic.h>
21 +#include <asm/compat.h>
22 #include <asm/kvm_virtio.h>
23
24 long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY |
25 diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
26 index ad1fb5d..eddcfb3 100644
27 --- a/arch/sparc/Makefile
28 +++ b/arch/sparc/Makefile
29 @@ -31,7 +31,7 @@ UTS_MACHINE := sparc
30
31 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
32 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
33 -KBUILD_AFLAGS += -m32
34 +KBUILD_AFLAGS += -m32 -Wa,-Av8
35
36 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37 # Since 2.5.40, the first stage is left not btfix-ed.
38 diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
39 index fc45ba8..e395693 100644
40 --- a/arch/x86/lib/delay.c
41 +++ b/arch/x86/lib/delay.c
42 @@ -48,9 +48,9 @@ static void delay_loop(unsigned long loops)
43 }
44
45 /* TSC based delay: */
46 -static void delay_tsc(unsigned long loops)
47 +static void delay_tsc(unsigned long __loops)
48 {
49 - unsigned long bclock, now;
50 + u32 bclock, now, loops = __loops;
51 int cpu;
52
53 preempt_disable();
54 diff --git a/block/genhd.c b/block/genhd.c
55 index 8c0829a..f6ecddb 100644
56 --- a/block/genhd.c
57 +++ b/block/genhd.c
58 @@ -36,6 +36,7 @@ static DEFINE_IDR(ext_devt_idr);
59
60 static struct device_type disk_type;
61
62 +static void disk_alloc_events(struct gendisk *disk);
63 static void disk_add_events(struct gendisk *disk);
64 static void disk_del_events(struct gendisk *disk);
65 static void disk_release_events(struct gendisk *disk);
66 @@ -602,6 +603,8 @@ void add_disk(struct gendisk *disk)
67 disk->major = MAJOR(devt);
68 disk->first_minor = MINOR(devt);
69
70 + disk_alloc_events(disk);
71 +
72 /* Register BDI before referencing it from bdev */
73 bdi = &disk->queue->backing_dev_info;
74 bdi_register_dev(bdi, disk_devt(disk));
75 @@ -1484,9 +1487,9 @@ static void __disk_unblock_events(struct gendisk *disk, bool check_now)
76 intv = disk_events_poll_jiffies(disk);
77 set_timer_slack(&ev->dwork.timer, intv / 4);
78 if (check_now)
79 - queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
80 + queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
81 else if (intv)
82 - queue_delayed_work(system_nrt_wq, &ev->dwork, intv);
83 + queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
84 out_unlock:
85 spin_unlock_irqrestore(&ev->lock, flags);
86 }
87 @@ -1527,7 +1530,7 @@ void disk_check_events(struct gendisk *disk)
88 spin_lock_irqsave(&ev->lock, flags);
89 if (!ev->block) {
90 cancel_delayed_work(&ev->dwork);
91 - queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
92 + queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
93 }
94 spin_unlock_irqrestore(&ev->lock, flags);
95 }
96 @@ -1565,7 +1568,7 @@ unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
97
98 /* uncondtionally schedule event check and wait for it to finish */
99 disk_block_events(disk);
100 - queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
101 + queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, 0);
102 flush_delayed_work(&ev->dwork);
103 __disk_unblock_events(disk, false);
104
105 @@ -1602,7 +1605,7 @@ static void disk_events_workfn(struct work_struct *work)
106
107 intv = disk_events_poll_jiffies(disk);
108 if (!ev->block && intv)
109 - queue_delayed_work(system_nrt_wq, &ev->dwork, intv);
110 + queue_delayed_work(system_nrt_freezable_wq, &ev->dwork, intv);
111
112 spin_unlock_irq(&ev->lock);
113
114 @@ -1740,9 +1743,9 @@ module_param_cb(events_dfl_poll_msecs, &disk_events_dfl_poll_msecs_param_ops,
115 &disk_events_dfl_poll_msecs, 0644);
116
117 /*
118 - * disk_{add|del|release}_events - initialize and destroy disk_events.
119 + * disk_{alloc|add|del|release}_events - initialize and destroy disk_events.
120 */
121 -static void disk_add_events(struct gendisk *disk)
122 +static void disk_alloc_events(struct gendisk *disk)
123 {
124 struct disk_events *ev;
125
126 @@ -1755,16 +1758,6 @@ static void disk_add_events(struct gendisk *disk)
127 return;
128 }
129
130 - if (sysfs_create_files(&disk_to_dev(disk)->kobj,
131 - disk_events_attrs) < 0) {
132 - pr_warn("%s: failed to create sysfs files for events\n",
133 - disk->disk_name);
134 - kfree(ev);
135 - return;
136 - }
137 -
138 - disk->ev = ev;
139 -
140 INIT_LIST_HEAD(&ev->node);
141 ev->disk = disk;
142 spin_lock_init(&ev->lock);
143 @@ -1773,8 +1766,21 @@ static void disk_add_events(struct gendisk *disk)
144 ev->poll_msecs = -1;
145 INIT_DELAYED_WORK(&ev->dwork, disk_events_workfn);
146
147 + disk->ev = ev;
148 +}
149 +
150 +static void disk_add_events(struct gendisk *disk)
151 +{
152 + if (!disk->ev)
153 + return;
154 +
155 + /* FIXME: error handling */
156 + if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0)
157 + pr_warn("%s: failed to create sysfs files for events\n",
158 + disk->disk_name);
159 +
160 mutex_lock(&disk_events_mutex);
161 - list_add_tail(&ev->node, &disk_events);
162 + list_add_tail(&disk->ev->node, &disk_events);
163 mutex_unlock(&disk_events_mutex);
164
165 /*
166 diff --git a/drivers/base/core.c b/drivers/base/core.c
167 index 78445f4..d13851c 100644
168 --- a/drivers/base/core.c
169 +++ b/drivers/base/core.c
170 @@ -1743,8 +1743,10 @@ void device_shutdown(void)
171 */
172 list_del_init(&dev->kobj.entry);
173 spin_unlock(&devices_kset->list_lock);
174 - /* Disable all device's runtime power management */
175 - pm_runtime_disable(dev);
176 +
177 + /* Don't allow any more runtime suspends */
178 + pm_runtime_get_noresume(dev);
179 + pm_runtime_barrier(dev);
180
181 if (dev->bus && dev->bus->shutdown) {
182 dev_dbg(dev, "shutdown\n");
183 diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
184 index b70f0fc..eec7b7a 100644
185 --- a/drivers/block/sx8.c
186 +++ b/drivers/block/sx8.c
187 @@ -1116,7 +1116,7 @@ static inline void carm_handle_resp(struct carm_host *host,
188 break;
189 case MISC_GET_FW_VER: {
190 struct carm_fw_ver *ver = (struct carm_fw_ver *)
191 - mem + sizeof(struct carm_msg_get_fw_ver);
192 + (mem + sizeof(struct carm_msg_get_fw_ver));
193 if (!error) {
194 host->fw_ver = le32_to_cpu(ver->version);
195 host->flags |= (ver->features & FL_FW_VER_MASK);
196 diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
197 index e6ad3bb..4799393 100644
198 --- a/drivers/firewire/core-cdev.c
199 +++ b/drivers/firewire/core-cdev.c
200 @@ -216,15 +216,33 @@ struct inbound_phy_packet_event {
201 struct fw_cdev_event_phy_packet phy_packet;
202 };
203
204 -static inline void __user *u64_to_uptr(__u64 value)
205 +#ifdef CONFIG_COMPAT
206 +static void __user *u64_to_uptr(u64 value)
207 +{
208 + if (is_compat_task())
209 + return compat_ptr(value);
210 + else
211 + return (void __user *)(unsigned long)value;
212 +}
213 +
214 +static u64 uptr_to_u64(void __user *ptr)
215 +{
216 + if (is_compat_task())
217 + return ptr_to_compat(ptr);
218 + else
219 + return (u64)(unsigned long)ptr;
220 +}
221 +#else
222 +static inline void __user *u64_to_uptr(u64 value)
223 {
224 return (void __user *)(unsigned long)value;
225 }
226
227 -static inline __u64 uptr_to_u64(void __user *ptr)
228 +static inline u64 uptr_to_u64(void __user *ptr)
229 {
230 - return (__u64)(unsigned long)ptr;
231 + return (u64)(unsigned long)ptr;
232 }
233 +#endif /* CONFIG_COMPAT */
234
235 static int fw_device_op_open(struct inode *inode, struct file *file)
236 {
237 diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
238 index 95a4714..9f661e0 100644
239 --- a/drivers/firewire/core-device.c
240 +++ b/drivers/firewire/core-device.c
241 @@ -455,15 +455,20 @@ static struct device_attribute fw_device_attributes[] = {
242 static int read_rom(struct fw_device *device,
243 int generation, int index, u32 *data)
244 {
245 - int rcode;
246 + u64 offset = (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4;
247 + int i, rcode;
248
249 /* device->node_id, accessed below, must not be older than generation */
250 smp_rmb();
251
252 - rcode = fw_run_transaction(device->card, TCODE_READ_QUADLET_REQUEST,
253 - device->node_id, generation, device->max_speed,
254 - (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4,
255 - data, 4);
256 + for (i = 10; i < 100; i += 10) {
257 + rcode = fw_run_transaction(device->card,
258 + TCODE_READ_QUADLET_REQUEST, device->node_id,
259 + generation, device->max_speed, offset, data, 4);
260 + if (rcode != RCODE_BUSY)
261 + break;
262 + msleep(i);
263 + }
264 be32_to_cpus(data);
265
266 return rcode;
267 diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
268 index 359bb1e..e51b582 100644
269 --- a/drivers/hwmon/w83627ehf.c
270 +++ b/drivers/hwmon/w83627ehf.c
271 @@ -1583,7 +1583,7 @@ store_##reg(struct device *dev, struct device_attribute *attr, \
272 val = step_time_to_reg(val, data->pwm_mode[nr]); \
273 mutex_lock(&data->update_lock); \
274 data->reg[nr] = val; \
275 - w83627ehf_write_value(data, W83627EHF_REG_##REG[nr], val); \
276 + w83627ehf_write_value(data, data->REG_##REG[nr], val); \
277 mutex_unlock(&data->update_lock); \
278 return count; \
279 } \
280 @@ -1823,7 +1823,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
281 goto exit;
282 }
283
284 - data = kzalloc(sizeof(struct w83627ehf_data), GFP_KERNEL);
285 + data = devm_kzalloc(&pdev->dev, sizeof(struct w83627ehf_data),
286 + GFP_KERNEL);
287 if (!data) {
288 err = -ENOMEM;
289 goto exit_release;
290 @@ -2319,9 +2320,8 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
291
292 exit_remove:
293 w83627ehf_device_remove_files(dev);
294 - kfree(data);
295 - platform_set_drvdata(pdev, NULL);
296 exit_release:
297 + platform_set_drvdata(pdev, NULL);
298 release_region(res->start, IOREGION_LENGTH);
299 exit:
300 return err;
301 @@ -2335,7 +2335,6 @@ static int __devexit w83627ehf_remove(struct platform_device *pdev)
302 w83627ehf_device_remove_files(&pdev->dev);
303 release_region(data->addr, IOREGION_LENGTH);
304 platform_set_drvdata(pdev, NULL);
305 - kfree(data);
306
307 return 0;
308 }
309 diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
310 index eca3bcc..f2ce8c3 100644
311 --- a/drivers/i2c/algos/i2c-algo-bit.c
312 +++ b/drivers/i2c/algos/i2c-algo-bit.c
313 @@ -103,8 +103,14 @@ static int sclhi(struct i2c_algo_bit_data *adap)
314 * chips may hold it low ("clock stretching") while they
315 * are processing data internally.
316 */
317 - if (time_after(jiffies, start + adap->timeout))
318 + if (time_after(jiffies, start + adap->timeout)) {
319 + /* Test one last time, as we may have been preempted
320 + * between last check and timeout test.
321 + */
322 + if (getscl(adap))
323 + break;
324 return -ETIMEDOUT;
325 + }
326 cond_resched();
327 }
328 #ifdef DEBUG
329 diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
330 index 1269ba5..5e34e21 100644
331 --- a/drivers/net/atl1c/atl1c_main.c
332 +++ b/drivers/net/atl1c/atl1c_main.c
333 @@ -2223,10 +2223,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
334 dev_info(&adapter->pdev->dev, "tx locked\n");
335 return NETDEV_TX_LOCKED;
336 }
337 - if (skb->mark == 0x01)
338 - type = atl1c_trans_high;
339 - else
340 - type = atl1c_trans_normal;
341
342 if (atl1c_tpd_avail(adapter, type) < tpd_req) {
343 /* no enough descriptor, just stop queue */
344 diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
345 index 4609bc0..33d0131 100644
346 --- a/drivers/net/ppp_generic.c
347 +++ b/drivers/net/ppp_generic.c
348 @@ -2019,14 +2019,22 @@ ppp_mp_reconstruct(struct ppp *ppp)
349 continue;
350 }
351 if (PPP_MP_CB(p)->sequence != seq) {
352 + u32 oldseq;
353 /* Fragment `seq' is missing. If it is after
354 minseq, it might arrive later, so stop here. */
355 if (seq_after(seq, minseq))
356 break;
357 /* Fragment `seq' is lost, keep going. */
358 lost = 1;
359 + oldseq = seq;
360 seq = seq_before(minseq, PPP_MP_CB(p)->sequence)?
361 minseq + 1: PPP_MP_CB(p)->sequence;
362 +
363 + if (ppp->debug & 1)
364 + netdev_printk(KERN_DEBUG, ppp->dev,
365 + "lost frag %u..%u\n",
366 + oldseq, seq-1);
367 +
368 goto again;
369 }
370
371 @@ -2071,6 +2079,10 @@ ppp_mp_reconstruct(struct ppp *ppp)
372 struct sk_buff *tmp2;
373
374 skb_queue_reverse_walk_from_safe(list, p, tmp2) {
375 + if (ppp->debug & 1)
376 + netdev_printk(KERN_DEBUG, ppp->dev,
377 + "discarding frag %u\n",
378 + PPP_MP_CB(p)->sequence);
379 __skb_unlink(p, list);
380 kfree_skb(p);
381 }
382 @@ -2086,6 +2098,17 @@ ppp_mp_reconstruct(struct ppp *ppp)
383 /* If we have discarded any fragments,
384 signal a receive error. */
385 if (PPP_MP_CB(head)->sequence != ppp->nextseq) {
386 + skb_queue_walk_safe(list, p, tmp) {
387 + if (p == head)
388 + break;
389 + if (ppp->debug & 1)
390 + netdev_printk(KERN_DEBUG, ppp->dev,
391 + "discarding frag %u\n",
392 + PPP_MP_CB(p)->sequence);
393 + __skb_unlink(p, list);
394 + kfree_skb(p);
395 + }
396 +
397 if (ppp->debug & 1)
398 netdev_printk(KERN_DEBUG, ppp->dev,
399 " missed pkts %u..%u\n",
400 diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
401 index 62e4364..4004fc2 100644
402 --- a/drivers/net/sfc/rx.c
403 +++ b/drivers/net/sfc/rx.c
404 @@ -155,11 +155,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue)
405 if (unlikely(!skb))
406 return -ENOMEM;
407
408 - /* Adjust the SKB for padding and checksum */
409 + /* Adjust the SKB for padding */
410 skb_reserve(skb, NET_IP_ALIGN);
411 rx_buf->len = skb_len - NET_IP_ALIGN;
412 rx_buf->is_page = false;
413 - skb->ip_summed = CHECKSUM_UNNECESSARY;
414
415 rx_buf->dma_addr = pci_map_single(efx->pci_dev,
416 skb->data, rx_buf->len,
417 @@ -498,6 +497,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel,
418
419 EFX_BUG_ON_PARANOID(!checksummed);
420 rx_buf->u.skb = NULL;
421 + skb->ip_summed = CHECKSUM_UNNECESSARY;
422
423 gro_result = napi_gro_receive(napi, skb);
424 }
425 diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
426 index 7105577..3e33573 100644
427 --- a/drivers/net/usb/asix.c
428 +++ b/drivers/net/usb/asix.c
429 @@ -1485,6 +1485,10 @@ static const struct usb_device_id products [] = {
430 USB_DEVICE (0x6189, 0x182d),
431 .driver_info = (unsigned long) &ax8817x_info,
432 }, {
433 + // Sitecom LN-031 "USB 2.0 10/100/1000 Ethernet adapter"
434 + USB_DEVICE (0x0df6, 0x0056),
435 + .driver_info = (unsigned long) &ax88178_info,
436 +}, {
437 // corega FEther USB2-TX
438 USB_DEVICE (0x07aa, 0x0017),
439 .driver_info = (unsigned long) &ax8817x_info,
440 diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
441 index 6740235..0ef676d 100644
442 --- a/drivers/net/vmxnet3/vmxnet3_drv.c
443 +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
444 @@ -830,13 +830,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
445 ctx->l4_hdr_size = ((struct tcphdr *)
446 skb_transport_header(skb))->doff * 4;
447 else if (iph->protocol == IPPROTO_UDP)
448 - /*
449 - * Use tcp header size so that bytes to
450 - * be copied are more than required by
451 - * the device.
452 - */
453 ctx->l4_hdr_size =
454 - sizeof(struct tcphdr);
455 + sizeof(struct udphdr);
456 else
457 ctx->l4_hdr_size = 0;
458 } else {
459 diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
460 index e08d75e..862be05 100644
461 --- a/drivers/net/vmxnet3/vmxnet3_int.h
462 +++ b/drivers/net/vmxnet3/vmxnet3_int.h
463 @@ -69,10 +69,10 @@
464 /*
465 * Version numbers
466 */
467 -#define VMXNET3_DRIVER_VERSION_STRING "1.1.18.0-k"
468 +#define VMXNET3_DRIVER_VERSION_STRING "1.1.29.0-k"
469
470 /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
471 -#define VMXNET3_DRIVER_VERSION_NUM 0x01011200
472 +#define VMXNET3_DRIVER_VERSION_NUM 0x01011D00
473
474 #if defined(CONFIG_PCI_MSI)
475 /* RSS only makes sense if MSI-X is supported. */
476 diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
477 index dffaa8f..5bd2c55 100644
478 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
479 +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
480 @@ -410,10 +410,14 @@ void rt2x00lib_txdone(struct queue_entry *entry,
481 /*
482 * If the data queue was below the threshold before the txdone
483 * handler we must make sure the packet queue in the mac80211 stack
484 - * is reenabled when the txdone handler has finished.
485 + * is reenabled when the txdone handler has finished. This has to be
486 + * serialized with rt2x00mac_tx(), otherwise we can wake up queue
487 + * before it was stopped.
488 */
489 + spin_lock_bh(&entry->queue->tx_lock);
490 if (!rt2x00queue_threshold(entry->queue))
491 rt2x00queue_unpause_queue(entry->queue);
492 + spin_unlock_bh(&entry->queue->tx_lock);
493 }
494 EXPORT_SYMBOL_GPL(rt2x00lib_txdone);
495
496 diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
497 index a76fdbe..bc159be 100644
498 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c
499 +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
500 @@ -152,13 +152,22 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
501 if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false)))
502 goto exit_fail;
503
504 + /*
505 + * Pausing queue has to be serialized with rt2x00lib_txdone(). Note
506 + * we should not use spin_lock_bh variant as bottom halve was already
507 + * disabled before ieee80211_xmit() call.
508 + */
509 + spin_lock(&queue->tx_lock);
510 if (rt2x00queue_threshold(queue))
511 rt2x00queue_pause_queue(queue);
512 + spin_unlock(&queue->tx_lock);
513
514 return;
515
516 exit_fail:
517 + spin_lock(&queue->tx_lock);
518 rt2x00queue_pause_queue(queue);
519 + spin_unlock(&queue->tx_lock);
520 exit_free_skb:
521 dev_kfree_skb_any(skb);
522 }
523 diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
524 index 2886d25..76f26ad 100644
525 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c
526 +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
527 @@ -562,6 +562,9 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
528 u8 rate_idx, rate_flags;
529 int ret = 0;
530
531 + /*
532 + * That function must be called with bh disabled.
533 + */
534 spin_lock(&queue->tx_lock);
535
536 entry = rt2x00queue_get_entry(queue, Q_INDEX);
537 diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
538 index e25af67..56a6966 100644
539 --- a/drivers/pci/pcie/aspm.c
540 +++ b/drivers/pci/pcie/aspm.c
541 @@ -500,6 +500,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
542 int pos;
543 u32 reg32;
544
545 + if (aspm_disabled)
546 + return 0;
547 +
548 /*
549 * Some functions in a slot might not all be PCIe functions,
550 * very strange. Disable ASPM for the whole slot
551 diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
552 index e1c4938..db9b25a 100644
553 --- a/drivers/platform/x86/acer-wmi.c
554 +++ b/drivers/platform/x86/acer-wmi.c
555 @@ -304,6 +304,10 @@ static struct quirk_entry quirk_fujitsu_amilo_li_1718 = {
556 .wireless = 2,
557 };
558
559 +static struct quirk_entry quirk_lenovo_ideapad_s205 = {
560 + .wireless = 3,
561 +};
562 +
563 /* The Aspire One has a dummy ACPI-WMI interface - disable it */
564 static struct dmi_system_id __devinitdata acer_blacklist[] = {
565 {
566 @@ -450,6 +454,24 @@ static struct dmi_system_id acer_quirks[] = {
567 },
568 .driver_data = &quirk_medion_md_98300,
569 },
570 + {
571 + .callback = dmi_matched,
572 + .ident = "Lenovo Ideapad S205",
573 + .matches = {
574 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
575 + DMI_MATCH(DMI_PRODUCT_NAME, "10382LG"),
576 + },
577 + .driver_data = &quirk_lenovo_ideapad_s205,
578 + },
579 + {
580 + .callback = dmi_matched,
581 + .ident = "Lenovo 3000 N200",
582 + .matches = {
583 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
584 + DMI_MATCH(DMI_PRODUCT_NAME, "0687A31"),
585 + },
586 + .driver_data = &quirk_fujitsu_amilo_li_1718,
587 + },
588 {}
589 };
590
591 @@ -542,6 +564,12 @@ struct wmi_interface *iface)
592 return AE_ERROR;
593 *value = result & 0x1;
594 return AE_OK;
595 + case 3:
596 + err = ec_read(0x78, &result);
597 + if (err)
598 + return AE_ERROR;
599 + *value = result & 0x1;
600 + return AE_OK;
601 default:
602 err = ec_read(0xA, &result);
603 if (err)
604 @@ -648,6 +676,32 @@ static acpi_status AMW0_find_mailled(void)
605 return AE_OK;
606 }
607
608 +static int AMW0_set_cap_acpi_check_device_found;
609 +
610 +static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
611 + u32 level, void *context, void **retval)
612 +{
613 + AMW0_set_cap_acpi_check_device_found = 1;
614 + return AE_OK;
615 +}
616 +
617 +static const struct acpi_device_id norfkill_ids[] = {
618 + { "VPC2004", 0},
619 + { "IBM0068", 0},
620 + { "LEN0068", 0},
621 + { "", 0},
622 +};
623 +
624 +static int AMW0_set_cap_acpi_check_device(void)
625 +{
626 + const struct acpi_device_id *id;
627 +
628 + for (id = norfkill_ids; id->id[0]; id++)
629 + acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
630 + NULL, NULL);
631 + return AMW0_set_cap_acpi_check_device_found;
632 +}
633 +
634 static acpi_status AMW0_set_capabilities(void)
635 {
636 struct wmab_args args;
637 @@ -661,7 +715,9 @@ static acpi_status AMW0_set_capabilities(void)
638 * work.
639 */
640 if (wmi_has_guid(AMW0_GUID2)) {
641 - interface->capability |= ACER_CAP_WIRELESS;
642 + if ((quirks != &quirk_unknown) ||
643 + !AMW0_set_cap_acpi_check_device())
644 + interface->capability |= ACER_CAP_WIRELESS;
645 return AE_OK;
646 }
647
648 @@ -1265,9 +1321,15 @@ static void acer_rfkill_update(struct work_struct *ignored)
649 u32 state;
650 acpi_status status;
651
652 - status = get_u32(&state, ACER_CAP_WIRELESS);
653 - if (ACPI_SUCCESS(status))
654 - rfkill_set_sw_state(wireless_rfkill, !state);
655 + if (has_cap(ACER_CAP_WIRELESS)) {
656 + status = get_u32(&state, ACER_CAP_WIRELESS);
657 + if (ACPI_SUCCESS(status)) {
658 + if (quirks->wireless == 3)
659 + rfkill_set_hw_state(wireless_rfkill, !state);
660 + else
661 + rfkill_set_sw_state(wireless_rfkill, !state);
662 + }
663 + }
664
665 if (has_cap(ACER_CAP_BLUETOOTH)) {
666 status = get_u32(&state, ACER_CAP_BLUETOOTH);
667 @@ -1334,19 +1396,24 @@ static struct rfkill *acer_rfkill_register(struct device *dev,
668
669 static int acer_rfkill_init(struct device *dev)
670 {
671 - wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN,
672 - "acer-wireless", ACER_CAP_WIRELESS);
673 - if (IS_ERR(wireless_rfkill))
674 - return PTR_ERR(wireless_rfkill);
675 + int err;
676 +
677 + if (has_cap(ACER_CAP_WIRELESS)) {
678 + wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN,
679 + "acer-wireless", ACER_CAP_WIRELESS);
680 + if (IS_ERR(wireless_rfkill)) {
681 + err = PTR_ERR(wireless_rfkill);
682 + goto error_wireless;
683 + }
684 + }
685
686 if (has_cap(ACER_CAP_BLUETOOTH)) {
687 bluetooth_rfkill = acer_rfkill_register(dev,
688 RFKILL_TYPE_BLUETOOTH, "acer-bluetooth",
689 ACER_CAP_BLUETOOTH);
690 if (IS_ERR(bluetooth_rfkill)) {
691 - rfkill_unregister(wireless_rfkill);
692 - rfkill_destroy(wireless_rfkill);
693 - return PTR_ERR(bluetooth_rfkill);
694 + err = PTR_ERR(bluetooth_rfkill);
695 + goto error_bluetooth;
696 }
697 }
698
699 @@ -1355,30 +1422,44 @@ static int acer_rfkill_init(struct device *dev)
700 RFKILL_TYPE_WWAN, "acer-threeg",
701 ACER_CAP_THREEG);
702 if (IS_ERR(threeg_rfkill)) {
703 - rfkill_unregister(wireless_rfkill);
704 - rfkill_destroy(wireless_rfkill);
705 - rfkill_unregister(bluetooth_rfkill);
706 - rfkill_destroy(bluetooth_rfkill);
707 - return PTR_ERR(threeg_rfkill);
708 + err = PTR_ERR(threeg_rfkill);
709 + goto error_threeg;
710 }
711 }
712
713 rfkill_inited = true;
714
715 - if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
716 + if ((ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID)) &&
717 + has_cap(ACER_CAP_WIRELESS | ACER_CAP_BLUETOOTH | ACER_CAP_THREEG))
718 schedule_delayed_work(&acer_rfkill_work,
719 round_jiffies_relative(HZ));
720
721 return 0;
722 +
723 +error_threeg:
724 + if (has_cap(ACER_CAP_BLUETOOTH)) {
725 + rfkill_unregister(bluetooth_rfkill);
726 + rfkill_destroy(bluetooth_rfkill);
727 + }
728 +error_bluetooth:
729 + if (has_cap(ACER_CAP_WIRELESS)) {
730 + rfkill_unregister(wireless_rfkill);
731 + rfkill_destroy(wireless_rfkill);
732 + }
733 +error_wireless:
734 + return err;
735 }
736
737 static void acer_rfkill_exit(void)
738 {
739 - if (ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID))
740 + if ((ec_raw_mode || !wmi_has_guid(ACERWMID_EVENT_GUID)) &&
741 + has_cap(ACER_CAP_WIRELESS | ACER_CAP_BLUETOOTH | ACER_CAP_THREEG))
742 cancel_delayed_work_sync(&acer_rfkill_work);
743
744 - rfkill_unregister(wireless_rfkill);
745 - rfkill_destroy(wireless_rfkill);
746 + if (has_cap(ACER_CAP_WIRELESS)) {
747 + rfkill_unregister(wireless_rfkill);
748 + rfkill_destroy(wireless_rfkill);
749 + }
750
751 if (has_cap(ACER_CAP_BLUETOOTH)) {
752 rfkill_unregister(bluetooth_rfkill);
753 diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
754 index 9166aa0..229b6f4 100644
755 --- a/drivers/regulator/tps6524x-regulator.c
756 +++ b/drivers/regulator/tps6524x-regulator.c
757 @@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
758 if (i >= info->n_voltages)
759 i = info->n_voltages - 1;
760
761 - *selector = info->voltages[i];
762 + *selector = i;
763
764 return write_field(hw, &info->voltage, i);
765 }
766 diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
767 index e197fd7..2150824 100644
768 --- a/drivers/s390/char/fs3270.c
769 +++ b/drivers/s390/char/fs3270.c
770 @@ -16,6 +16,7 @@
771 #include <linux/types.h>
772 #include <linux/compat.h>
773
774 +#include <asm/compat.h>
775 #include <asm/ccwdev.h>
776 #include <asm/cio.h>
777 #include <asm/ebcdic.h>
778 diff --git a/fs/aio.c b/fs/aio.c
779 index e29ec48..b4a88cc 100644
780 --- a/fs/aio.c
781 +++ b/fs/aio.c
782 @@ -228,12 +228,6 @@ static void __put_ioctx(struct kioctx *ctx)
783 call_rcu(&ctx->rcu_head, ctx_rcu_free);
784 }
785
786 -static inline void get_ioctx(struct kioctx *kioctx)
787 -{
788 - BUG_ON(atomic_read(&kioctx->users) <= 0);
789 - atomic_inc(&kioctx->users);
790 -}
791 -
792 static inline int try_get_ioctx(struct kioctx *kioctx)
793 {
794 return atomic_inc_not_zero(&kioctx->users);
795 @@ -273,7 +267,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
796 mm = ctx->mm = current->mm;
797 atomic_inc(&mm->mm_count);
798
799 - atomic_set(&ctx->users, 1);
800 + atomic_set(&ctx->users, 2);
801 spin_lock_init(&ctx->ctx_lock);
802 spin_lock_init(&ctx->ring_info.ring_lock);
803 init_waitqueue_head(&ctx->wait);
804 @@ -527,11 +521,16 @@ static void aio_fput_routine(struct work_struct *data)
805 fput(req->ki_filp);
806
807 /* Link the iocb into the context's free list */
808 + rcu_read_lock();
809 spin_lock_irq(&ctx->ctx_lock);
810 really_put_req(ctx, req);
811 + /*
812 + * at that point ctx might've been killed, but actual
813 + * freeing is RCU'd
814 + */
815 spin_unlock_irq(&ctx->ctx_lock);
816 + rcu_read_unlock();
817
818 - put_ioctx(ctx);
819 spin_lock_irq(&fput_lock);
820 }
821 spin_unlock_irq(&fput_lock);
822 @@ -562,7 +561,6 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req)
823 * this function will be executed w/out any aio kthread wakeup.
824 */
825 if (unlikely(!fput_atomic(req->ki_filp))) {
826 - get_ioctx(ctx);
827 spin_lock(&fput_lock);
828 list_add(&req->ki_list, &fput_head);
829 spin_unlock(&fput_lock);
830 @@ -1256,10 +1254,10 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
831 ret = PTR_ERR(ioctx);
832 if (!IS_ERR(ioctx)) {
833 ret = put_user(ioctx->user_id, ctxp);
834 - if (!ret)
835 + if (!ret) {
836 + put_ioctx(ioctx);
837 return 0;
838 -
839 - get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
840 + }
841 io_destroy(ioctx);
842 }
843
844 diff --git a/fs/block_dev.c b/fs/block_dev.c
845 index 34503ba..74fc5ed 100644
846 --- a/fs/block_dev.c
847 +++ b/fs/block_dev.c
848 @@ -1149,8 +1149,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
849 * The latter is necessary to prevent ghost
850 * partitions on a removed medium.
851 */
852 - if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
853 - rescan_partitions(disk, bdev);
854 + if (bdev->bd_invalidated) {
855 + if (!ret)
856 + rescan_partitions(disk, bdev);
857 + else if (ret == -ENOMEDIUM)
858 + invalidate_partitions(disk, bdev);
859 + }
860 if (ret)
861 goto out_clear;
862 } else {
863 @@ -1180,8 +1184,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
864 if (bdev->bd_disk->fops->open)
865 ret = bdev->bd_disk->fops->open(bdev, mode);
866 /* the same as first opener case, read comment there */
867 - if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
868 - rescan_partitions(bdev->bd_disk, bdev);
869 + if (bdev->bd_invalidated) {
870 + if (!ret)
871 + rescan_partitions(bdev->bd_disk, bdev);
872 + else if (ret == -ENOMEDIUM)
873 + invalidate_partitions(bdev->bd_disk, bdev);
874 + }
875 if (ret)
876 goto out_unlock_bdev;
877 }
878 diff --git a/fs/namei.c b/fs/namei.c
879 index f7593c0..16bda6c 100644
880 --- a/fs/namei.c
881 +++ b/fs/namei.c
882 @@ -2109,7 +2109,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
883 /* sayonara */
884 error = complete_walk(nd);
885 if (error)
886 - return ERR_PTR(-ECHILD);
887 + return ERR_PTR(error);
888
889 error = -ENOTDIR;
890 if (nd->flags & LOOKUP_DIRECTORY) {
891 @@ -2208,7 +2208,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
892 /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
893 error = complete_walk(nd);
894 if (error)
895 - goto exit;
896 + return ERR_PTR(error);
897 error = -EISDIR;
898 if (S_ISDIR(nd->inode->i_mode))
899 goto exit;
900 diff --git a/fs/partitions/check.c b/fs/partitions/check.c
901 index d545e97..96d13c8 100644
902 --- a/fs/partitions/check.c
903 +++ b/fs/partitions/check.c
904 @@ -539,17 +539,11 @@ static bool disk_unlock_native_capacity(struct gendisk *disk)
905 }
906 }
907
908 -int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
909 +static int drop_partitions(struct gendisk *disk, struct block_device *bdev)
910 {
911 - struct parsed_partitions *state = NULL;
912 struct disk_part_iter piter;
913 struct hd_struct *part;
914 - int p, highest, res;
915 -rescan:
916 - if (state && !IS_ERR(state)) {
917 - kfree(state);
918 - state = NULL;
919 - }
920 + int res;
921
922 if (bdev->bd_part_count)
923 return -EBUSY;
924 @@ -562,6 +556,24 @@ rescan:
925 delete_partition(disk, part->partno);
926 disk_part_iter_exit(&piter);
927
928 + return 0;
929 +}
930 +
931 +int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
932 +{
933 + struct parsed_partitions *state = NULL;
934 + struct hd_struct *part;
935 + int p, highest, res;
936 +rescan:
937 + if (state && !IS_ERR(state)) {
938 + kfree(state);
939 + state = NULL;
940 + }
941 +
942 + res = drop_partitions(disk, bdev);
943 + if (res)
944 + return res;
945 +
946 if (disk->fops->revalidate_disk)
947 disk->fops->revalidate_disk(disk);
948 check_disk_size_change(disk, bdev);
949 @@ -665,6 +677,26 @@ rescan:
950 return 0;
951 }
952
953 +int invalidate_partitions(struct gendisk *disk, struct block_device *bdev)
954 +{
955 + int res;
956 +
957 + if (!bdev->bd_invalidated)
958 + return 0;
959 +
960 + res = drop_partitions(disk, bdev);
961 + if (res)
962 + return res;
963 +
964 + set_capacity(disk, 0);
965 + check_disk_size_change(disk, bdev);
966 + bdev->bd_invalidated = 0;
967 + /* tell userspace that the media / partition table may have changed */
968 + kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE);
969 +
970 + return 0;
971 +}
972 +
973 unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p)
974 {
975 struct address_space *mapping = bdev->bd_inode->i_mapping;
976 diff --git a/include/linux/genhd.h b/include/linux/genhd.h
977 index 300d758..6f43b14 100644
978 --- a/include/linux/genhd.h
979 +++ b/include/linux/genhd.h
980 @@ -594,6 +594,7 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
981
982 extern int disk_expand_part_tbl(struct gendisk *disk, int target);
983 extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
984 +extern int invalidate_partitions(struct gendisk *disk, struct block_device *bdev);
985 extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
986 int partno, sector_t start,
987 sector_t len, int flags,
988 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
989 index b920a72..f13b52b 100644
990 --- a/include/linux/skbuff.h
991 +++ b/include/linux/skbuff.h
992 @@ -1370,6 +1370,16 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
993 }
994 #endif /* NET_SKBUFF_DATA_USES_OFFSET */
995
996 +static inline void skb_mac_header_rebuild(struct sk_buff *skb)
997 +{
998 + if (skb_mac_header_was_set(skb)) {
999 + const unsigned char *old_mac = skb_mac_header(skb);
1000 +
1001 + skb_set_mac_header(skb, -skb->mac_len);
1002 + memmove(skb_mac_header(skb), old_mac, skb->mac_len);
1003 + }
1004 +}
1005 +
1006 static inline int skb_checksum_start_offset(const struct sk_buff *skb)
1007 {
1008 return skb->csum_start - skb_headroom(skb);
1009 diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
1010 index f584aba..6c56a14 100644
1011 --- a/include/linux/workqueue.h
1012 +++ b/include/linux/workqueue.h
1013 @@ -289,12 +289,16 @@ enum {
1014 *
1015 * system_freezable_wq is equivalent to system_wq except that it's
1016 * freezable.
1017 + *
1018 + * system_nrt_freezable_wq is equivalent to system_nrt_wq except that
1019 + * it's freezable.
1020 */
1021 extern struct workqueue_struct *system_wq;
1022 extern struct workqueue_struct *system_long_wq;
1023 extern struct workqueue_struct *system_nrt_wq;
1024 extern struct workqueue_struct *system_unbound_wq;
1025 extern struct workqueue_struct *system_freezable_wq;
1026 +extern struct workqueue_struct *system_nrt_freezable_wq;
1027
1028 extern struct workqueue_struct *
1029 __alloc_workqueue_key(const char *name, unsigned int flags, int max_active,
1030 diff --git a/kernel/workqueue.c b/kernel/workqueue.c
1031 index aec02b6..1456dab 100644
1032 --- a/kernel/workqueue.c
1033 +++ b/kernel/workqueue.c
1034 @@ -252,11 +252,13 @@ struct workqueue_struct *system_long_wq __read_mostly;
1035 struct workqueue_struct *system_nrt_wq __read_mostly;
1036 struct workqueue_struct *system_unbound_wq __read_mostly;
1037 struct workqueue_struct *system_freezable_wq __read_mostly;
1038 +struct workqueue_struct *system_nrt_freezable_wq __read_mostly;
1039 EXPORT_SYMBOL_GPL(system_wq);
1040 EXPORT_SYMBOL_GPL(system_long_wq);
1041 EXPORT_SYMBOL_GPL(system_nrt_wq);
1042 EXPORT_SYMBOL_GPL(system_unbound_wq);
1043 EXPORT_SYMBOL_GPL(system_freezable_wq);
1044 +EXPORT_SYMBOL_GPL(system_nrt_freezable_wq);
1045
1046 #define CREATE_TRACE_POINTS
1047 #include <trace/events/workqueue.h>
1048 @@ -3796,8 +3798,11 @@ static int __init init_workqueues(void)
1049 WQ_UNBOUND_MAX_ACTIVE);
1050 system_freezable_wq = alloc_workqueue("events_freezable",
1051 WQ_FREEZABLE, 0);
1052 + system_nrt_freezable_wq = alloc_workqueue("events_nrt_freezable",
1053 + WQ_NON_REENTRANT | WQ_FREEZABLE, 0);
1054 BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq ||
1055 - !system_unbound_wq || !system_freezable_wq);
1056 + !system_unbound_wq || !system_freezable_wq ||
1057 + !system_nrt_freezable_wq);
1058 return 0;
1059 }
1060 early_initcall(init_workqueues);
1061 diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
1062 index 995cbe0..c23a4b1 100644
1063 --- a/net/bridge/br_multicast.c
1064 +++ b/net/bridge/br_multicast.c
1065 @@ -446,8 +446,11 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
1066 ip6h->nexthdr = IPPROTO_HOPOPTS;
1067 ip6h->hop_limit = 1;
1068 ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1));
1069 - ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0,
1070 - &ip6h->saddr);
1071 + if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0,
1072 + &ip6h->saddr)) {
1073 + kfree_skb(skb);
1074 + return NULL;
1075 + }
1076 ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest);
1077
1078 hopopt = (u8 *)(ip6h + 1);
1079 diff --git a/net/core/neighbour.c b/net/core/neighbour.c
1080 index 8c54aff..96bb0a3 100644
1081 --- a/net/core/neighbour.c
1082 +++ b/net/core/neighbour.c
1083 @@ -823,6 +823,8 @@ next_elt:
1084 write_unlock_bh(&tbl->lock);
1085 cond_resched();
1086 write_lock_bh(&tbl->lock);
1087 + nht = rcu_dereference_protected(tbl->nht,
1088 + lockdep_is_held(&tbl->lock));
1089 }
1090 /* Cycle through all hash buckets every base_reachable_time/2 ticks.
1091 * ARP entry timeouts range from 1/2 base_reachable_time to 3/2
1092 diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
1093 index ee08f11f..72b1857 100644
1094 --- a/net/ipv4/tcp_input.c
1095 +++ b/net/ipv4/tcp_input.c
1096 @@ -1385,8 +1385,16 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
1097
1098 BUG_ON(!pcount);
1099
1100 - /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
1101 - if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
1102 + /* Adjust counters and hints for the newly sacked sequence
1103 + * range but discard the return value since prev is already
1104 + * marked. We must tag the range first because the seq
1105 + * advancement below implicitly advances
1106 + * tcp_highest_sack_seq() when skb is highest_sack.
1107 + */
1108 + tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
1109 + start_seq, end_seq, dup_sack, pcount);
1110 +
1111 + if (skb == tp->lost_skb_hint)
1112 tp->lost_cnt_hint += pcount;
1113
1114 TCP_SKB_CB(prev)->end_seq += shifted;
1115 @@ -1412,12 +1420,6 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
1116 skb_shinfo(skb)->gso_type = 0;
1117 }
1118
1119 - /* Adjust counters and hints for the newly sacked sequence range but
1120 - * discard the return value since prev is already marked.
1121 - */
1122 - tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,
1123 - start_seq, end_seq, dup_sack, pcount);
1124 -
1125 /* Difference in this won't matter, both ACKed by the same cumul. ACK */
1126 TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);
1127
1128 @@ -1565,6 +1567,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
1129 }
1130 }
1131
1132 + /* tcp_sacktag_one() won't SACK-tag ranges below snd_una */
1133 + if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))
1134 + goto fallback;
1135 +
1136 if (!skb_shift(prev, skb, len))
1137 goto fallback;
1138 if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack))
1139 @@ -2547,6 +2553,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head)
1140
1141 if (cnt > packets) {
1142 if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) ||
1143 + (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) ||
1144 (oldcnt >= packets))
1145 break;
1146
1147 diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
1148 index 6341818..e3db3f9 100644
1149 --- a/net/ipv4/xfrm4_mode_beet.c
1150 +++ b/net/ipv4/xfrm4_mode_beet.c
1151 @@ -110,10 +110,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb)
1152
1153 skb_push(skb, sizeof(*iph));
1154 skb_reset_network_header(skb);
1155 -
1156 - memmove(skb->data - skb->mac_len, skb_mac_header(skb),
1157 - skb->mac_len);
1158 - skb_set_mac_header(skb, -skb->mac_len);
1159 + skb_mac_header_rebuild(skb);
1160
1161 xfrm4_beet_make_header(skb);
1162
1163 diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c
1164 index 534972e..ed4bf11 100644
1165 --- a/net/ipv4/xfrm4_mode_tunnel.c
1166 +++ b/net/ipv4/xfrm4_mode_tunnel.c
1167 @@ -66,7 +66,6 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
1168
1169 static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
1170 {
1171 - const unsigned char *old_mac;
1172 int err = -EINVAL;
1173
1174 if (XFRM_MODE_SKB_CB(skb)->protocol != IPPROTO_IPIP)
1175 @@ -84,10 +83,9 @@ static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
1176 if (!(x->props.flags & XFRM_STATE_NOECN))
1177 ipip_ecn_decapsulate(skb);
1178
1179 - old_mac = skb_mac_header(skb);
1180 - skb_set_mac_header(skb, -skb->mac_len);
1181 - memmove(skb_mac_header(skb), old_mac, skb->mac_len);
1182 skb_reset_network_header(skb);
1183 + skb_mac_header_rebuild(skb);
1184 +
1185 err = 0;
1186
1187 out:
1188 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
1189 index 0f335c6..be29337 100644
1190 --- a/net/ipv6/addrconf.c
1191 +++ b/net/ipv6/addrconf.c
1192 @@ -433,6 +433,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
1193 /* Join all-node multicast group */
1194 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
1195
1196 + /* Join all-router multicast group if forwarding is set */
1197 + if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
1198 + ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
1199 +
1200 return ndev;
1201 }
1202
1203 diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c
1204 index 3437d7d..f37cba9 100644
1205 --- a/net/ipv6/xfrm6_mode_beet.c
1206 +++ b/net/ipv6/xfrm6_mode_beet.c
1207 @@ -80,7 +80,6 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb)
1208 static int xfrm6_beet_input(struct xfrm_state *x, struct sk_buff *skb)
1209 {
1210 struct ipv6hdr *ip6h;
1211 - const unsigned char *old_mac;
1212 int size = sizeof(struct ipv6hdr);
1213 int err;
1214
1215 @@ -90,10 +89,7 @@ static int xfrm6_beet_input(struct xfrm_state *x, struct sk_buff *skb)
1216
1217 __skb_push(skb, size);
1218 skb_reset_network_header(skb);
1219 -
1220 - old_mac = skb_mac_header(skb);
1221 - skb_set_mac_header(skb, -skb->mac_len);
1222 - memmove(skb_mac_header(skb), old_mac, skb->mac_len);
1223 + skb_mac_header_rebuild(skb);
1224
1225 xfrm6_beet_make_header(skb);
1226
1227 diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c
1228 index 4d6edff..23ecd68 100644
1229 --- a/net/ipv6/xfrm6_mode_tunnel.c
1230 +++ b/net/ipv6/xfrm6_mode_tunnel.c
1231 @@ -63,7 +63,6 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
1232 static int xfrm6_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
1233 {
1234 int err = -EINVAL;
1235 - const unsigned char *old_mac;
1236
1237 if (XFRM_MODE_SKB_CB(skb)->protocol != IPPROTO_IPV6)
1238 goto out;
1239 @@ -80,10 +79,9 @@ static int xfrm6_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
1240 if (!(x->props.flags & XFRM_STATE_NOECN))
1241 ipip6_ecn_decapsulate(skb);
1242
1243 - old_mac = skb_mac_header(skb);
1244 - skb_set_mac_header(skb, -skb->mac_len);
1245 - memmove(skb_mac_header(skb), old_mac, skb->mac_len);
1246 skb_reset_network_header(skb);
1247 + skb_mac_header_rebuild(skb);
1248 +
1249 err = 0;
1250
1251 out:
1252 diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
1253 index 16152ed..c1290da 100644
1254 --- a/sound/soc/samsung/neo1973_wm8753.c
1255 +++ b/sound/soc/samsung/neo1973_wm8753.c
1256 @@ -425,7 +425,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
1257 .platform_name = "samsung-audio",
1258 .cpu_dai_name = "s3c24xx-iis",
1259 .codec_dai_name = "wm8753-hifi",
1260 - .codec_name = "wm8753-codec.0-001a",
1261 + .codec_name = "wm8753.0-001a",
1262 .init = neo1973_wm8753_init,
1263 .ops = &neo1973_hifi_ops,
1264 },
1265 @@ -434,7 +434,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
1266 .stream_name = "Voice",
1267 .cpu_dai_name = "dfbmcs320-pcm",
1268 .codec_dai_name = "wm8753-voice",
1269 - .codec_name = "wm8753-codec.0-001a",
1270 + .codec_name = "wm8753.0-001a",
1271 .ops = &neo1973_voice_ops,
1272 },
1273 };

  ViewVC Help
Powered by ViewVC 1.1.20