Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0138-2.6.27.39-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1176 - (show annotations) (download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 7 months ago) by niro
File size: 27741 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
2 index 8c5e1de..5b1ccc2 100644
3 --- a/arch/m68k/Kconfig
4 +++ b/arch/m68k/Kconfig
5 @@ -572,7 +572,7 @@ config HPAPCI
6
7 config MVME147_SCC
8 bool "SCC support for MVME147 serial ports"
9 - depends on MVME147
10 + depends on MVME147 && BROKEN
11 help
12 This is the driver for the serial ports on the Motorola MVME147
13 boards. Everyone using one of these boards should say Y here.
14 @@ -587,14 +587,14 @@ config SERIAL167
15
16 config MVME162_SCC
17 bool "SCC support for MVME162 serial ports"
18 - depends on MVME16x
19 + depends on MVME16x && BROKEN
20 help
21 This is the driver for the serial ports on the Motorola MVME162 and
22 172 boards. Everyone using one of these boards should say Y here.
23
24 config BVME6000_SCC
25 bool "SCC support for BVME6000 serial ports"
26 - depends on BVME6000
27 + depends on BVME6000 && BROKEN
28 help
29 This is the driver for the serial ports on the BVME4000 and BVME6000
30 boards from BVM Ltd. Everyone using one of these boards should say
31 diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
32 index 09b59b2..5d7f4af 100644
33 --- a/arch/x86/ia32/ia32entry.S
34 +++ b/arch/x86/ia32/ia32entry.S
35 @@ -204,7 +204,7 @@ sysexit_from_sys_call:
36 movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */
37 .endm
38
39 - .macro auditsys_exit exit,ebpsave=RBP
40 + .macro auditsys_exit exit
41 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
42 jnz ia32_ret_from_sys_call
43 TRACE_IRQS_ON
44 @@ -217,7 +217,6 @@ sysexit_from_sys_call:
45 call audit_syscall_exit
46 GET_THREAD_INFO(%r10)
47 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */
48 - movl \ebpsave-ARGOFFSET(%rsp),%ebp /* reload user register value */
49 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
50 cli
51 TRACE_IRQS_OFF
52 @@ -351,7 +350,7 @@ cstar_auditsys:
53 jmp cstar_dispatch
54
55 sysretl_audit:
56 - auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */
57 + auditsys_exit sysretl_from_sys_call
58 #endif
59
60 cstar_tracesys:
61 diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
62 index 923e682..7d58f32 100644
63 --- a/arch/x86/kernel/amd_iommu_init.c
64 +++ b/arch/x86/kernel/amd_iommu_init.c
65 @@ -230,7 +230,7 @@ static void __init iommu_feature_enable(struct amd_iommu *iommu, u8 bit)
66 writel(ctrl, iommu->mmio_base + MMIO_CONTROL_OFFSET);
67 }
68
69 -static void __init iommu_feature_disable(struct amd_iommu *iommu, u8 bit)
70 +static void iommu_feature_disable(struct amd_iommu *iommu, u8 bit)
71 {
72 u32 ctrl;
73
74 @@ -430,6 +430,27 @@ static void set_dev_entry_bit(u16 devid, u8 bit)
75 amd_iommu_dev_table[devid].data[i] |= (1 << _bit);
76 }
77
78 +static int get_dev_entry_bit(u16 devid, u8 bit)
79 +{
80 + int i = (bit >> 5) & 0x07;
81 + int _bit = bit & 0x1f;
82 +
83 + return (amd_iommu_dev_table[devid].data[i] & (1 << _bit)) >> _bit;
84 +}
85 +
86 +
87 +void amd_iommu_apply_erratum_63(u16 devid)
88 +{
89 + int sysmgt;
90 +
91 + sysmgt = get_dev_entry_bit(devid, DEV_ENTRY_SYSMGT1) |
92 + (get_dev_entry_bit(devid, DEV_ENTRY_SYSMGT2) << 1);
93 +
94 + if (sysmgt == 0x01)
95 + set_dev_entry_bit(devid, DEV_ENTRY_IW);
96 +}
97 +
98 +
99 /* Writes the specific IOMMU for a device into the rlookup table */
100 static void __init set_iommu_for_device(struct amd_iommu *iommu, u16 devid)
101 {
102 @@ -458,6 +479,8 @@ static void __init set_dev_entry_from_acpi(struct amd_iommu *iommu,
103 if (flags & ACPI_DEVFLAG_LINT1)
104 set_dev_entry_bit(devid, DEV_ENTRY_LINT1_PASS);
105
106 + amd_iommu_apply_erratum_63(devid);
107 +
108 set_iommu_for_device(iommu, devid);
109 }
110
111 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
112 index 60ebfd7..bf872f2 100644
113 --- a/arch/x86/kvm/x86.c
114 +++ b/arch/x86/kvm/x86.c
115 @@ -1223,6 +1223,8 @@ static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
116
117 if (cpuid->nent < 1)
118 goto out;
119 + if (cpuid->nent > KVM_MAX_CPUID_ENTRIES)
120 + cpuid->nent = KVM_MAX_CPUID_ENTRIES;
121 r = -ENOMEM;
122 cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry2) * cpuid->nent);
123 if (!cpuid_entries)
124 diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
125 index afa66f4..0450761 100644
126 --- a/drivers/acpi/scan.c
127 +++ b/drivers/acpi/scan.c
128 @@ -1262,16 +1262,6 @@ acpi_add_single_object(struct acpi_device **child,
129 acpi_device_set_id(device, parent, handle, type);
130
131 /*
132 - * The ACPI device is attached to acpi handle before getting
133 - * the power/wakeup/peformance flags. Otherwise OS can't get
134 - * the corresponding ACPI device by the acpi handle in the course
135 - * of getting the power/wakeup/performance flags.
136 - */
137 - result = acpi_device_set_context(device, type);
138 - if (result)
139 - goto end;
140 -
141 - /*
142 * Power Management
143 * ----------------
144 */
145 @@ -1301,6 +1291,8 @@ acpi_add_single_object(struct acpi_device **child,
146 goto end;
147 }
148
149 + if ((result = acpi_device_set_context(device, type)))
150 + goto end;
151
152 result = acpi_device_register(device, parent);
153
154 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
155 index 5cdd821..8afc274 100644
156 --- a/drivers/ata/libata-core.c
157 +++ b/drivers/ata/libata-core.c
158 @@ -4747,12 +4747,14 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
159 qc->flags |= ATA_QCFLAG_FAILED;
160
161 if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
162 - if (!ata_tag_internal(qc->tag)) {
163 - /* always fill result TF for failed qc */
164 - fill_result_tf(qc);
165 + /* always fill result TF for failed qc */
166 + fill_result_tf(qc);
167 +
168 + if (!ata_tag_internal(qc->tag))
169 ata_qc_schedule_eh(qc);
170 - return;
171 - }
172 + else
173 + __ata_qc_complete(qc);
174 + return;
175 }
176
177 /* read result TF if requested */
178 diff --git a/drivers/base/driver.c b/drivers/base/driver.c
179 index 1e2bda7..296d833 100644
180 --- a/drivers/base/driver.c
181 +++ b/drivers/base/driver.c
182 @@ -227,7 +227,7 @@ int driver_register(struct device_driver *drv)
183 put_driver(other);
184 printk(KERN_ERR "Error: Driver '%s' is already registered, "
185 "aborting...\n", drv->name);
186 - return -EEXIST;
187 + return -EBUSY;
188 }
189
190 ret = bus_add_driver(drv);
191 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
192 index caff851..8b91700 100644
193 --- a/drivers/char/Kconfig
194 +++ b/drivers/char/Kconfig
195 @@ -310,7 +310,7 @@ config SPECIALIX
196
197 config SX
198 tristate "Specialix SX (and SI) card support"
199 - depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
200 + depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) && BROKEN
201 help
202 This is a driver for the SX and SI multiport serial cards.
203 Please read the file <file:Documentation/sx.txt> for details.
204 @@ -321,7 +321,7 @@ config SX
205
206 config RIO
207 tristate "Specialix RIO system support"
208 - depends on SERIAL_NONSTANDARD
209 + depends on SERIAL_NONSTANDARD && BROKEN
210 help
211 This is a driver for the Specialix RIO, a smart serial card which
212 drives an outboard box that can support up to 128 ports. Product
213 @@ -382,7 +382,7 @@ config NOZOMI
214
215 config A2232
216 tristate "Commodore A2232 serial support (EXPERIMENTAL)"
217 - depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP
218 + depends on EXPERIMENTAL && ZORRO && BROKEN
219 ---help---
220 This option supports the 2232 7-port serial card shipped with the
221 Amiga 2000 and other Zorro-bus machines, dating from 1989. At
222 diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
223 index d349c4a..6bb5157 100644
224 --- a/drivers/input/mouse/synaptics.c
225 +++ b/drivers/input/mouse/synaptics.c
226 @@ -623,6 +623,16 @@ static const struct dmi_system_id toshiba_dmi_table[] = {
227 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
228 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"),
229 },
230 +
231 + },
232 + {
233 + .ident = "Toshiba Portege M300",
234 + .matches = {
235 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
236 + DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
237 + DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
238 + },
239 +
240 },
241 { }
242 };
243 diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
244 index 1071144..6d0107c 100644
245 --- a/drivers/net/appletalk/ipddp.c
246 +++ b/drivers/net/appletalk/ipddp.c
247 @@ -173,8 +173,7 @@ static int ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
248 ((struct net_device_stats *) dev->priv)->tx_packets++;
249 ((struct net_device_stats *) dev->priv)->tx_bytes+=skb->len;
250
251 - if(aarp_send_ddp(rt->dev, skb, &rt->at, NULL) < 0)
252 - dev_kfree_skb(skb);
253 + aarp_send_ddp(rt->dev, skb, &rt->at, NULL);
254
255 return 0;
256 }
257 diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
258 index f9f29c9..5a07b50 100644
259 --- a/drivers/net/bonding/bond_main.c
260 +++ b/drivers/net/bonding/bond_main.c
261 @@ -686,7 +686,7 @@ static int bond_update_speed_duplex(struct slave *slave)
262 */
263 static int bond_check_dev_link(struct bonding *bond, struct net_device *slave_dev, int reporting)
264 {
265 - static int (* ioctl)(struct net_device *, struct ifreq *, int);
266 + int (* ioctl)(struct net_device *, struct ifreq *, int);
267 struct ifreq ifr;
268 struct mii_ioctl_data *mii;
269
270 diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
271 index 34ae125..f9c355e 100644
272 --- a/drivers/net/wireless/b43/rfkill.c
273 +++ b/drivers/net/wireless/b43/rfkill.c
274 @@ -36,7 +36,8 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
275 & B43_MMIO_RADIO_HWENABLED_HI_MASK))
276 return 1;
277 } else {
278 - if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
279 + if (b43_status(dev) >= B43_STAT_STARTED &&
280 + b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
281 & B43_MMIO_RADIO_HWENABLED_LO_MASK)
282 return 1;
283 }
284 diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
285 index 632c291..5e37c2f 100644
286 --- a/drivers/net/wireless/libertas/if_usb.c
287 +++ b/drivers/net/wireless/libertas/if_usb.c
288 @@ -443,7 +443,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
289 /* Fill the receive configuration URB and initialise the Rx call back */
290 usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
291 usb_rcvbulkpipe(cardp->udev, cardp->ep_in),
292 - (void *) (skb->tail + (size_t) IPFIELD_ALIGN_OFFSET),
293 + skb->data + IPFIELD_ALIGN_OFFSET,
294 MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn,
295 cardp);
296
297 diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
298 index 963960d..eef4e86 100644
299 --- a/drivers/net/wireless/ray_cs.c
300 +++ b/drivers/net/wireless/ray_cs.c
301 @@ -2758,7 +2758,7 @@ static void raycs_write(const char *name, write_proc_t *w, void *data)
302 static int write_essid(struct file *file, const char __user *buffer, unsigned long count, void *data)
303 {
304 static char proc_essid[33];
305 - int len = count;
306 + unsigned int len = count;
307
308 if (len > 32)
309 len = 32;
310 diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
311 index 7716145..b38fe67 100644
312 --- a/drivers/scsi/dpt_i2o.c
313 +++ b/drivers/scsi/dpt_i2o.c
314 @@ -1918,6 +1918,10 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
315 }
316 size = size>>16;
317 size *= 4;
318 + if (size > MAX_MESSAGE_SIZE) {
319 + rcode = -EINVAL;
320 + goto cleanup;
321 + }
322 /* Copy in the user's I2O command */
323 if (copy_from_user (msg, user_msg, size)) {
324 rcode = -EFAULT;
325 diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
326 index 9f72ad7..3a56f92 100644
327 --- a/drivers/serial/8250_pci.c
328 +++ b/drivers/serial/8250_pci.c
329 @@ -1218,6 +1218,7 @@ enum pci_board_num_t {
330 pbn_exar_XR17C152,
331 pbn_exar_XR17C154,
332 pbn_exar_XR17C158,
333 + pbn_exar_ibm_saturn,
334 pbn_pasemi_1682M,
335 };
336
337 @@ -1746,6 +1747,13 @@ static struct pciserial_board pci_boards[] __devinitdata = {
338 .base_baud = 921600,
339 .uart_offset = 0x200,
340 },
341 + [pbn_exar_ibm_saturn] = {
342 + .flags = FL_BASE0,
343 + .num_ports = 1,
344 + .base_baud = 921600,
345 + .uart_offset = 0x200,
346 + },
347 +
348 /*
349 * PA Semi PWRficient PA6T-1682M on-chip UART
350 */
351 @@ -2217,6 +2225,9 @@ static struct pci_device_id serial_pci_tbl[] = {
352 PCI_SUBVENDOR_ID_CONNECT_TECH,
353 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0,
354 pbn_b0_8_1843200_200 },
355 + { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
356 + PCI_VENDOR_ID_IBM, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT,
357 + 0, 0, pbn_exar_ibm_saturn },
358
359 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
360 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
361 diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
362 index 175d08e..bed78ac 100644
363 --- a/fs/hfsplus/wrapper.c
364 +++ b/fs/hfsplus/wrapper.c
365 @@ -99,6 +99,10 @@ int hfsplus_read_wrapper(struct super_block *sb)
366
367 if (hfsplus_get_last_session(sb, &part_start, &part_size))
368 return -EINVAL;
369 + if ((u64)part_start + part_size > 0x100000000ULL) {
370 + pr_err("hfs: volumes larger than 2TB are not supported yet\n");
371 + return -EINVAL;
372 + }
373 while (1) {
374 bh = sb_bread512(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, vhdr);
375 if (!bh)
376 diff --git a/fs/nfs/client.c b/fs/nfs/client.c
377 index 5ee23e7..9d6a0e4 100644
378 --- a/fs/nfs/client.c
379 +++ b/fs/nfs/client.c
380 @@ -983,7 +983,7 @@ static int nfs4_init_client(struct nfs_client *clp,
381 RPC_CLNT_CREATE_DISCRTRY);
382 if (error < 0)
383 goto error;
384 - memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
385 + strlcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
386
387 error = nfs_idmap_new(clp);
388 if (error < 0) {
389 diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
390 index c3fe156..e195f67 100644
391 --- a/fs/nfs/dir.c
392 +++ b/fs/nfs/dir.c
393 @@ -1014,12 +1014,12 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
394 res = NULL;
395 goto out;
396 /* This turned out not to be a regular file */
397 - case -EISDIR:
398 case -ENOTDIR:
399 goto no_open;
400 case -ELOOP:
401 if (!(nd->intent.open.flags & O_NOFOLLOW))
402 goto no_open;
403 + /* case -EISDIR: */
404 /* case -EINVAL: */
405 default:
406 goto out;
407 @@ -1526,6 +1526,8 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
408 old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
409 dentry->d_parent->d_name.name, dentry->d_name.name);
410
411 + nfs_inode_return_delegation(inode);
412 +
413 d_drop(dentry);
414 error = NFS_PROTO(dir)->link(inode, dir, &dentry->d_name);
415 if (error == 0) {
416 diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
417 index 630feb3..8a5c1d5 100644
418 --- a/fs/nfs/direct.c
419 +++ b/fs/nfs/direct.c
420 @@ -454,6 +454,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
421 };
422 struct rpc_task_setup task_setup_data = {
423 .rpc_client = NFS_CLIENT(inode),
424 + .rpc_message = &msg,
425 .callback_ops = &nfs_write_direct_ops,
426 .workqueue = nfsiod_workqueue,
427 .flags = RPC_TASK_ASYNC,
428 diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
429 index c910413..ad4e800 100644
430 --- a/fs/nfs/nfs4proc.c
431 +++ b/fs/nfs/nfs4proc.c
432 @@ -71,12 +71,17 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
433 /* Prevent leaks of NFSv4 errors into userland */
434 int nfs4_map_errors(int err)
435 {
436 - if (err < -1000) {
437 + if (err >= -1000)
438 + return err;
439 + switch (err) {
440 + case -NFS4ERR_RESOURCE:
441 + return -EREMOTEIO;
442 + default:
443 dprintk("%s could not handle NFSv4 error %d\n",
444 __func__, -err);
445 - return -EIO;
446 + break;
447 }
448 - return err;
449 + return -EIO;
450 }
451
452 /*
453 @@ -3550,15 +3555,23 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
454 if (request->fl_start < 0 || request->fl_end < 0)
455 return -EINVAL;
456
457 - if (IS_GETLK(cmd))
458 - return nfs4_proc_getlk(state, F_GETLK, request);
459 + if (IS_GETLK(cmd)) {
460 + if (state != NULL)
461 + return nfs4_proc_getlk(state, F_GETLK, request);
462 + return 0;
463 + }
464
465 if (!(IS_SETLK(cmd) || IS_SETLKW(cmd)))
466 return -EINVAL;
467
468 - if (request->fl_type == F_UNLCK)
469 - return nfs4_proc_unlck(state, cmd, request);
470 + if (request->fl_type == F_UNLCK) {
471 + if (state != NULL)
472 + return nfs4_proc_unlck(state, cmd, request);
473 + return 0;
474 + }
475
476 + if (state == NULL)
477 + return -ENOLCK;
478 do {
479 status = nfs4_proc_setlk(state, cmd, request);
480 if ((status != -EAGAIN) || IS_SETLK(cmd))
481 diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
482 index 3305acb..6ede673 100644
483 --- a/fs/nfs/nfs4renewd.c
484 +++ b/fs/nfs/nfs4renewd.c
485 @@ -125,12 +125,6 @@ nfs4_schedule_state_renewal(struct nfs_client *clp)
486 }
487
488 void
489 -nfs4_renewd_prepare_shutdown(struct nfs_server *server)
490 -{
491 - cancel_delayed_work(&server->nfs_client->cl_renewd);
492 -}
493 -
494 -void
495 nfs4_kill_renewd(struct nfs_client *clp)
496 {
497 cancel_delayed_work_sync(&clp->cl_renewd);
498 diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
499 index b916297..5e26759 100644
500 --- a/fs/nfs/nfs4xdr.c
501 +++ b/fs/nfs/nfs4xdr.c
502 @@ -4671,7 +4671,6 @@ static struct {
503 { NFS4ERR_SERVERFAULT, -ESERVERFAULT },
504 { NFS4ERR_BADTYPE, -EBADTYPE },
505 { NFS4ERR_LOCKED, -EAGAIN },
506 - { NFS4ERR_RESOURCE, -EREMOTEIO },
507 { NFS4ERR_SYMLINK, -ELOOP },
508 { NFS4ERR_OP_ILLEGAL, -EOPNOTSUPP },
509 { NFS4ERR_DEADLOCK, -EDEADLK },
510 diff --git a/fs/nfs/super.c b/fs/nfs/super.c
511 index e9b2017..3da0fa5 100644
512 --- a/fs/nfs/super.c
513 +++ b/fs/nfs/super.c
514 @@ -2398,7 +2398,6 @@ static void nfs4_kill_super(struct super_block *sb)
515 nfs_return_all_delegations(sb);
516 kill_anon_super(sb);
517
518 - nfs4_renewd_prepare_shutdown(server);
519 nfs_free_server(server);
520 }
521
522 diff --git a/fs/pipe.c b/fs/pipe.c
523 index 35d2cbb..f91375f 100644
524 --- a/fs/pipe.c
525 +++ b/fs/pipe.c
526 @@ -742,36 +742,55 @@ pipe_rdwr_release(struct inode *inode, struct file *filp)
527 static int
528 pipe_read_open(struct inode *inode, struct file *filp)
529 {
530 - /* We could have perhaps used atomic_t, but this and friends
531 - below are the only places. So it doesn't seem worthwhile. */
532 + int ret = -ENOENT;
533 +
534 mutex_lock(&inode->i_mutex);
535 - inode->i_pipe->readers++;
536 +
537 + if (inode->i_pipe) {
538 + ret = 0;
539 + inode->i_pipe->readers++;
540 + }
541 +
542 mutex_unlock(&inode->i_mutex);
543
544 - return 0;
545 + return ret;
546 }
547
548 static int
549 pipe_write_open(struct inode *inode, struct file *filp)
550 {
551 + int ret = -ENOENT;
552 +
553 mutex_lock(&inode->i_mutex);
554 - inode->i_pipe->writers++;
555 +
556 + if (inode->i_pipe) {
557 + ret = 0;
558 + inode->i_pipe->writers++;
559 + }
560 +
561 mutex_unlock(&inode->i_mutex);
562
563 - return 0;
564 + return ret;
565 }
566
567 static int
568 pipe_rdwr_open(struct inode *inode, struct file *filp)
569 {
570 + int ret = -ENOENT;
571 +
572 mutex_lock(&inode->i_mutex);
573 - if (filp->f_mode & FMODE_READ)
574 - inode->i_pipe->readers++;
575 - if (filp->f_mode & FMODE_WRITE)
576 - inode->i_pipe->writers++;
577 +
578 + if (inode->i_pipe) {
579 + ret = 0;
580 + if (filp->f_mode & FMODE_READ)
581 + inode->i_pipe->readers++;
582 + if (filp->f_mode & FMODE_WRITE)
583 + inode->i_pipe->writers++;
584 + }
585 +
586 mutex_unlock(&inode->i_mutex);
587
588 - return 0;
589 + return ret;
590 }
591
592 /*
593 diff --git a/include/linux/kernel.h b/include/linux/kernel.h
594 index 2651f80..cd85f00 100644
595 --- a/include/linux/kernel.h
596 +++ b/include/linux/kernel.h
597 @@ -200,6 +200,8 @@ extern struct ratelimit_state printk_ratelimit_state;
598 extern int printk_ratelimit(void);
599 extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
600 unsigned int interval_msec);
601 +extern void printk_tick(void);
602 +extern int printk_needs_cpu(int);
603 #else
604 static inline int vprintk(const char *s, va_list args)
605 __attribute__ ((format (printf, 1, 0)));
606 @@ -211,6 +213,8 @@ static inline int printk_ratelimit(void) { return 0; }
607 static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
608 unsigned int interval_msec) \
609 { return false; }
610 +static inline void printk_tick(void) { }
611 +static inline int printk_needs_cpu(int) { return 0; }
612 #endif
613
614 extern void asmlinkage __attribute__((format(printf, 1, 2)))
615 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
616 index ba91fe1..c869aee 100644
617 --- a/include/linux/pci_ids.h
618 +++ b/include/linux/pci_ids.h
619 @@ -478,6 +478,9 @@
620 #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361
621 #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252
622
623 +#define PCI_SUBVENDOR_ID_IBM 0x1014
624 +#define PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT 0x03d4
625 +
626 #define PCI_VENDOR_ID_UNISYS 0x1018
627 #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C
628
629 diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
630 index 3025ae1..94c852d 100644
631 --- a/include/net/irda/irda_device.h
632 +++ b/include/net/irda/irda_device.h
633 @@ -135,9 +135,11 @@ struct dongle_reg {
634
635 /*
636 * Per-packet information we need to hide inside sk_buff
637 - * (must not exceed 48 bytes, check with struct sk_buff)
638 + * (must not exceed 48 bytes, check with struct sk_buff)
639 + * The default_qdisc_pad field is a temporary hack.
640 */
641 struct irda_skb_cb {
642 + unsigned int default_qdisc_pad;
643 magic_t magic; /* Be sure that we can trust the information */
644 __u32 next_speed; /* The Speed to be set *after* this frame */
645 __u16 mtt; /* Minimum turn around time */
646 diff --git a/kernel/printk.c b/kernel/printk.c
647 index 0084812..204660d 100644
648 --- a/kernel/printk.c
649 +++ b/kernel/printk.c
650 @@ -977,10 +977,25 @@ int is_console_locked(void)
651 return console_locked;
652 }
653
654 -void wake_up_klogd(void)
655 +static DEFINE_PER_CPU(int, printk_pending);
656 +
657 +void printk_tick(void)
658 {
659 - if (!oops_in_progress && waitqueue_active(&log_wait))
660 + if (__get_cpu_var(printk_pending)) {
661 + __get_cpu_var(printk_pending) = 0;
662 wake_up_interruptible(&log_wait);
663 + }
664 +}
665 +
666 +int printk_needs_cpu(int cpu)
667 +{
668 + return per_cpu(printk_pending, cpu);
669 +}
670 +
671 +void wake_up_klogd(void)
672 +{
673 + if (waitqueue_active(&log_wait))
674 + __get_cpu_var(printk_pending) = 1;
675 }
676
677 /**
678 diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
679 index cb02324..a7cb616 100644
680 --- a/kernel/time/tick-sched.c
681 +++ b/kernel/time/tick-sched.c
682 @@ -261,7 +261,7 @@ void tick_nohz_stop_sched_tick(int inidle)
683 next_jiffies = get_next_timer_interrupt(last_jiffies);
684 delta_jiffies = next_jiffies - last_jiffies;
685
686 - if (rcu_needs_cpu(cpu))
687 + if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu))
688 delta_jiffies = 1;
689 /*
690 * Do not stop the tick, if we are only one off
691 diff --git a/kernel/timer.c b/kernel/timer.c
692 index e9a0195..7acda56 100644
693 --- a/kernel/timer.c
694 +++ b/kernel/timer.c
695 @@ -978,6 +978,7 @@ void update_process_times(int user_tick)
696 run_local_timers();
697 if (rcu_pending(cpu))
698 rcu_check_callbacks(cpu, user_tick);
699 + printk_tick();
700 scheduler_tick();
701 run_posix_cpu_timers(p);
702 }
703 diff --git a/mm/mempolicy.c b/mm/mempolicy.c
704 index 83bea4f..7acf81c 100644
705 --- a/mm/mempolicy.c
706 +++ b/mm/mempolicy.c
707 @@ -985,7 +985,8 @@ static long do_mbind(unsigned long start, unsigned long len,
708
709 if (!err && nr_failed && (flags & MPOL_MF_STRICT))
710 err = -EIO;
711 - }
712 + } else
713 + putback_lru_pages(&pagelist);
714
715 up_write(&mm->mmap_sem);
716 mpol_put(new);
717 diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
718 index b25c1e9..dd076ea 100644
719 --- a/net/appletalk/aarp.c
720 +++ b/net/appletalk/aarp.c
721 @@ -598,7 +598,7 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
722
723 /* Non ELAP we cannot do. */
724 if (dev->type != ARPHRD_ETHER)
725 - return -1;
726 + goto free_it;
727
728 skb->dev = dev;
729 skb->protocol = htons(ETH_P_ATALK);
730 @@ -633,7 +633,7 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
731 if (!a) {
732 /* Whoops slipped... good job it's an unreliable protocol 8) */
733 write_unlock_bh(&aarp_lock);
734 - return -1;
735 + goto free_it;
736 }
737
738 /* Set up the queue */
739 @@ -662,15 +662,21 @@ out_unlock:
740 write_unlock_bh(&aarp_lock);
741
742 /* Tell the ddp layer we have taken over for this frame. */
743 - return 0;
744 + goto sent;
745
746 sendit:
747 if (skb->sk)
748 skb->priority = skb->sk->sk_priority;
749 - dev_queue_xmit(skb);
750 + if (dev_queue_xmit(skb))
751 + goto drop;
752 sent:
753 - return 1;
754 + return NET_XMIT_SUCCESS;
755 +free_it:
756 + kfree_skb(skb);
757 +drop:
758 + return NET_XMIT_DROP;
759 }
760 +EXPORT_SYMBOL(aarp_send_ddp);
761
762 /*
763 * An entry in the aarp unresolved queue has become resolved. Send
764 diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
765 index 8067dc7..e99d337 100644
766 --- a/net/appletalk/ddp.c
767 +++ b/net/appletalk/ddp.c
768 @@ -1277,8 +1277,10 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
769 struct net_device_stats *stats;
770
771 /* This needs to be able to handle ipddp"N" devices */
772 - if (!dev)
773 - return -ENODEV;
774 + if (!dev) {
775 + kfree_skb(skb);
776 + return NET_RX_DROP;
777 + }
778
779 skb->protocol = htons(ETH_P_IP);
780 skb_pull(skb, 13);
781 @@ -1288,8 +1290,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
782 stats = dev->priv;
783 stats->rx_packets++;
784 stats->rx_bytes += skb->len + 13;
785 - netif_rx(skb); /* Send the SKB up to a higher place. */
786 - return 0;
787 + return netif_rx(skb); /* Send the SKB up to a higher place. */
788 }
789 #else
790 /* make it easy for gcc to optimize this test out, i.e. kill the code */
791 @@ -1297,9 +1298,8 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
792 #define handle_ip_over_ddp(skb) 0
793 #endif
794
795 -static void atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
796 - struct ddpehdr *ddp, __u16 len_hops,
797 - int origlen)
798 +static int atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
799 + struct ddpehdr *ddp, __u16 len_hops, int origlen)
800 {
801 struct atalk_route *rt;
802 struct atalk_addr ta;
803 @@ -1366,8 +1366,6 @@ static void atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
804 /* 22 bytes - 12 ether, 2 len, 3 802.2 5 snap */
805 struct sk_buff *nskb = skb_realloc_headroom(skb, 32);
806 kfree_skb(skb);
807 - if (!nskb)
808 - goto out;
809 skb = nskb;
810 } else
811 skb = skb_unshare(skb, GFP_ATOMIC);
812 @@ -1376,12 +1374,16 @@ static void atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
813 * If the buffer didn't vanish into the lack of space bitbucket we can
814 * send it.
815 */
816 - if (skb && aarp_send_ddp(rt->dev, skb, &ta, NULL) == -1)
817 - goto free_it;
818 -out:
819 - return;
820 + if (skb == NULL)
821 + goto drop;
822 +
823 + if (aarp_send_ddp(rt->dev, skb, &ta, NULL) == NET_XMIT_DROP)
824 + return NET_RX_DROP;
825 + return NET_XMIT_SUCCESS;
826 free_it:
827 kfree_skb(skb);
828 +drop:
829 + return NET_RX_DROP;
830 }
831
832 /**
833 @@ -1455,8 +1457,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev,
834 /* Not ours, so we route the packet via the correct
835 * AppleTalk iface
836 */
837 - atalk_route_packet(skb, dev, ddp, len_hops, origlen);
838 - goto out;
839 + return atalk_route_packet(skb, dev, ddp, len_hops, origlen);
840 }
841
842 /* if IP over DDP is not selected this code will be optimized out */
843 @@ -1663,10 +1664,10 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
844 if (skb2) {
845 loopback = 1;
846 SOCK_DEBUG(sk, "SK %p: send out(copy).\n", sk);
847 - if (aarp_send_ddp(dev, skb2,
848 - &usat->sat_addr, NULL) == -1)
849 - kfree_skb(skb2);
850 - /* else queued/sent above in the aarp queue */
851 + /*
852 + * If it fails it is queued/sent above in the aarp queue
853 + */
854 + aarp_send_ddp(dev, skb2, &usat->sat_addr, NULL);
855 }
856 }
857
858 @@ -1696,9 +1697,10 @@ static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
859 usat = &gsat;
860 }
861
862 - if (aarp_send_ddp(dev, skb, &usat->sat_addr, NULL) == -1)
863 - kfree_skb(skb);
864 - /* else queued/sent above in the aarp queue */
865 + /*
866 + * If it fails it is queued/sent above in the aarp queue
867 + */
868 + aarp_send_ddp(dev, skb, &usat->sat_addr, NULL);
869 }
870 SOCK_DEBUG(sk, "SK %p: Done write (%Zd).\n", sk, len);
871
872 @@ -1877,7 +1879,6 @@ static struct packet_type ppptalk_packet_type = {
873 static unsigned char ddp_snap_id[] = { 0x08, 0x00, 0x07, 0x80, 0x9B };
874
875 /* Export symbols for use by drivers when AppleTalk is a module */
876 -EXPORT_SYMBOL(aarp_send_ddp);
877 EXPORT_SYMBOL(atrtr_get_dev);
878 EXPORT_SYMBOL(atalk_find_dev_addr);
879
880 diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
881 index 8eb79e9..5b66371 100644
882 --- a/net/sched/cls_api.c
883 +++ b/net/sched/cls_api.c
884 @@ -337,7 +337,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
885 tcm = NLMSG_DATA(nlh);
886 tcm->tcm_family = AF_UNSPEC;
887 tcm->tcm__pad1 = 0;
888 - tcm->tcm__pad1 = 0;
889 + tcm->tcm__pad2 = 0;
890 tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;
891 tcm->tcm_parent = tp->classid;
892 tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
893 diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
894 index 8e66fe0..facdaa9 100644
895 --- a/net/unix/af_unix.c
896 +++ b/net/unix/af_unix.c
897 @@ -1061,6 +1061,8 @@ restart:
898 err = -ECONNREFUSED;
899 if (other->sk_state != TCP_LISTEN)
900 goto out_unlock;
901 + if (other->sk_shutdown & RCV_SHUTDOWN)
902 + goto out_unlock;
903
904 if (unix_recvq_full(other)) {
905 err = -EAGAIN;