/[linux-patches]/genpatches-2.6/tags/2.6.32-47/1040_linux-2.6.32.41.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.32-47/1040_linux-2.6.32.41.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2037 - (show annotations) (download)
Wed Dec 28 14:38:55 2011 UTC (6 years, 11 months ago) by psomas
File size: 18803 byte(s)
2.6.32-47 release
1 diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h
2 index 3b62da9..54536ea 100644
3 --- a/arch/x86/include/asm/apicdef.h
4 +++ b/arch/x86/include/asm/apicdef.h
5 @@ -72,6 +72,7 @@
6 #define APIC_DEST_LOGICAL 0x00800
7 #define APIC_DEST_PHYSICAL 0x00000
8 #define APIC_DM_FIXED 0x00000
9 +#define APIC_DM_FIXED_MASK 0x00700
10 #define APIC_DM_LOWEST 0x00100
11 #define APIC_DM_SMI 0x00200
12 #define APIC_DM_REMRD 0x00300
13 diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
14 index 8f9c307..396c693 100644
15 --- a/arch/x86/kernel/cpu/amd.c
16 +++ b/arch/x86/kernel/cpu/amd.c
17 @@ -568,7 +568,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
18 #endif
19
20 /* As a rule processors have APIC timer running in deep C states */
21 - if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400))
22 + if (c->x86 > 0xf && !cpu_has_amd_erratum(amd_erratum_400))
23 set_cpu_cap(c, X86_FEATURE_ARAT);
24
25 /*
26 @@ -653,7 +653,7 @@ cpu_dev_register(amd_cpu_dev);
27 */
28
29 const int amd_erratum_400[] =
30 - AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0x0f, 0x4, 0x2, 0xff, 0xf),
31 + AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
32 AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));
33
34
35 diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
36 index 8387792..ef3cd31 100644
37 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
38 +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
39 @@ -468,6 +468,7 @@ recurse:
40 out_free:
41 if (b) {
42 kobject_put(&b->kobj);
43 + list_del(&b->miscj);
44 kfree(b);
45 }
46 return err;
47 diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
48 index 687638e..cf678c9 100644
49 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
50 +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
51 @@ -286,18 +286,20 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
52 */
53 rdmsr(MSR_IA32_MISC_ENABLE, l, h);
54
55 + h = lvtthmr_init;
56 /*
57 * The initial value of thermal LVT entries on all APs always reads
58 * 0x10000 because APs are woken up by BSP issuing INIT-SIPI-SIPI
59 * sequence to them and LVT registers are reset to 0s except for
60 * the mask bits which are set to 1s when APs receive INIT IPI.
61 - * Always restore the value that BIOS has programmed on AP based on
62 - * BSP's info we saved since BIOS is always setting the same value
63 - * for all threads/cores
64 + * If BIOS takes over the thermal interrupt and sets its interrupt
65 + * delivery mode to SMI (not fixed), it restores the value that the
66 + * BIOS has programmed on AP based on BSP's info we saved since BIOS
67 + * is always setting the same value for all threads/cores.
68 */
69 - apic_write(APIC_LVTTHMR, lvtthmr_init);
70 + if ((h & APIC_DM_FIXED_MASK) != APIC_DM_FIXED)
71 + apic_write(APIC_LVTTHMR, lvtthmr_init);
72
73 - h = lvtthmr_init;
74
75 if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) {
76 printk(KERN_DEBUG
77 diff --git a/drivers/net/Makefile b/drivers/net/Makefile
78 index 246323d..6a793ae 100644
79 --- a/drivers/net/Makefile
80 +++ b/drivers/net/Makefile
81 @@ -138,7 +138,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o
82 obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o
83 obj-$(CONFIG_B44) += b44.o
84 obj-$(CONFIG_FORCEDETH) += forcedeth.o
85 -obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
86 +obj-$(CONFIG_NE_H8300) += ne-h8300.o
87 obj-$(CONFIG_AX88796) += ax88796.o
88 obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
89
90 @@ -208,7 +208,7 @@ obj-$(CONFIG_SC92031) += sc92031.o
91 obj-$(CONFIG_LP486E) += lp486e.o
92
93 obj-$(CONFIG_ETH16I) += eth16i.o
94 -obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
95 +obj-$(CONFIG_ZORRO8390) += zorro8390.o
96 obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
97 obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
98 obj-$(CONFIG_EQUALIZER) += eql.o
99 @@ -220,7 +220,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o
100 obj-$(CONFIG_DECLANCE) += declance.o
101 obj-$(CONFIG_ATARILANCE) += atarilance.o
102 obj-$(CONFIG_A2065) += a2065.o
103 -obj-$(CONFIG_HYDRA) += hydra.o 8390.o
104 +obj-$(CONFIG_HYDRA) += hydra.o
105 obj-$(CONFIG_ARIADNE) += ariadne.o
106 obj-$(CONFIG_CS89x0) += cs89x0.o
107 obj-$(CONFIG_MACSONIC) += macsonic.o
108 diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
109 index d768852..b636e17 100644
110 --- a/drivers/net/ehea/ehea_ethtool.c
111 +++ b/drivers/net/ehea/ehea_ethtool.c
112 @@ -53,15 +53,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
113 cmd->duplex = -1;
114 }
115
116 - cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full
117 - | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half
118 - | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half
119 - | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
120 -
121 - cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg
122 - | ADVERTISED_FIBRE);
123 + if (cmd->speed == SPEED_10000) {
124 + cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
125 + cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
126 + cmd->port = PORT_FIBRE;
127 + } else {
128 + cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
129 + | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
130 + | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
131 + | SUPPORTED_TP);
132 + cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
133 + | ADVERTISED_TP);
134 + cmd->port = PORT_TP;
135 + }
136
137 - cmd->port = PORT_FIBRE;
138 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
139
140 return 0;
141 diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
142 index d496b6f..be1e2ef 100644
143 --- a/drivers/net/hydra.c
144 +++ b/drivers/net/hydra.c
145 @@ -98,15 +98,15 @@ static const struct net_device_ops hydra_netdev_ops = {
146 .ndo_open = hydra_open,
147 .ndo_stop = hydra_close,
148
149 - .ndo_start_xmit = ei_start_xmit,
150 - .ndo_tx_timeout = ei_tx_timeout,
151 - .ndo_get_stats = ei_get_stats,
152 - .ndo_set_multicast_list = ei_set_multicast_list,
153 + .ndo_start_xmit = __ei_start_xmit,
154 + .ndo_tx_timeout = __ei_tx_timeout,
155 + .ndo_get_stats = __ei_get_stats,
156 + .ndo_set_multicast_list = __ei_set_multicast_list,
157 .ndo_validate_addr = eth_validate_addr,
158 - .ndo_set_mac_address = eth_mac_addr,
159 + .ndo_set_mac_address = eth_mac_addr,
160 .ndo_change_mtu = eth_change_mtu,
161 #ifdef CONFIG_NET_POLL_CONTROLLER
162 - .ndo_poll_controller = ei_poll,
163 + .ndo_poll_controller = __ei_poll,
164 #endif
165 };
166
167 @@ -125,7 +125,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
168 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
169 };
170
171 - dev = alloc_ei_netdev();
172 + dev = ____alloc_ei_netdev(0);
173 if (!dev)
174 return -ENOMEM;
175
176 diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c
177 index 7bd6662..31da04f 100644
178 --- a/drivers/net/ne-h8300.c
179 +++ b/drivers/net/ne-h8300.c
180 @@ -167,7 +167,7 @@ static void cleanup_card(struct net_device *dev)
181 #ifndef MODULE
182 struct net_device * __init ne_probe(int unit)
183 {
184 - struct net_device *dev = alloc_ei_netdev();
185 + struct net_device *dev = ____alloc_ei_netdev(0);
186 int err;
187
188 if (!dev)
189 @@ -197,15 +197,15 @@ static const struct net_device_ops ne_netdev_ops = {
190 .ndo_open = ne_open,
191 .ndo_stop = ne_close,
192
193 - .ndo_start_xmit = ei_start_xmit,
194 - .ndo_tx_timeout = ei_tx_timeout,
195 - .ndo_get_stats = ei_get_stats,
196 - .ndo_set_multicast_list = ei_set_multicast_list,
197 + .ndo_start_xmit = __ei_start_xmit,
198 + .ndo_tx_timeout = __ei_tx_timeout,
199 + .ndo_get_stats = __ei_get_stats,
200 + .ndo_set_multicast_list = __ei_set_multicast_list,
201 .ndo_validate_addr = eth_validate_addr,
202 - .ndo_set_mac_address = eth_mac_addr,
203 + .ndo_set_mac_address = eth_mac_addr,
204 .ndo_change_mtu = eth_change_mtu,
205 #ifdef CONFIG_NET_POLL_CONTROLLER
206 - .ndo_poll_controller = ei_poll,
207 + .ndo_poll_controller = __ei_poll,
208 #endif
209 };
210
211 @@ -638,7 +638,7 @@ int init_module(void)
212 int err;
213
214 for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
215 - struct net_device *dev = alloc_ei_netdev();
216 + struct net_device *dev = ____alloc_ei_netdev(0);
217 if (!dev)
218 break;
219 if (io[this_dev]) {
220 diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
221 index 71975ba..e52af5b 100644
222 --- a/drivers/net/netxen/netxen_nic.h
223 +++ b/drivers/net/netxen/netxen_nic.h
224 @@ -490,7 +490,6 @@ struct status_desc {
225 #define NX_P2_MN_ROMIMAGE_NAME "nxromimg.bin"
226 #define NX_P3_CT_ROMIMAGE_NAME "nx3fwct.bin"
227 #define NX_P3_MN_ROMIMAGE_NAME "nx3fwmn.bin"
228 -#define NX_UNIFIED_ROMIMAGE_NAME "phanfw.bin"
229 #define NX_FLASH_ROMIMAGE_NAME "flash"
230
231 extern char netxen_nic_driver_name[];
232 diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
233 index 562a488..7167c91 100644
234 --- a/drivers/net/netxen/netxen_nic_init.c
235 +++ b/drivers/net/netxen/netxen_nic_init.c
236 @@ -676,7 +676,6 @@ static char *fw_name[] = {
237 NX_P2_MN_ROMIMAGE_NAME,
238 NX_P3_CT_ROMIMAGE_NAME,
239 NX_P3_MN_ROMIMAGE_NAME,
240 - NX_UNIFIED_ROMIMAGE_NAME,
241 NX_FLASH_ROMIMAGE_NAME,
242 };
243
244 diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
245 index 9890a7e..166fc23 100644
246 --- a/drivers/net/netxen/netxen_nic_main.c
247 +++ b/drivers/net/netxen/netxen_nic_main.c
248 @@ -41,7 +41,6 @@ MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID);
249 MODULE_FIRMWARE(NX_P2_MN_ROMIMAGE_NAME);
250 MODULE_FIRMWARE(NX_P3_CT_ROMIMAGE_NAME);
251 MODULE_FIRMWARE(NX_P3_MN_ROMIMAGE_NAME);
252 -MODULE_FIRMWARE(NX_UNIFIED_ROMIMAGE_NAME);
253
254 char netxen_nic_driver_name[] = "netxen_nic";
255 static char netxen_nic_driver_string[] = "NetXen Network Driver version "
256 diff --git a/drivers/net/slip.c b/drivers/net/slip.c
257 index fe3cebb..9a3088f 100644
258 --- a/drivers/net/slip.c
259 +++ b/drivers/net/slip.c
260 @@ -850,7 +850,9 @@ static int slip_open(struct tty_struct *tty)
261 /* Done. We have linked the TTY line to a channel. */
262 rtnl_unlock();
263 tty->receive_room = 65536; /* We don't flow control */
264 - return sl->dev->base_addr;
265 +
266 + /* TTY layer expects 0 on success */
267 + return 0;
268
269 err_free_bufs:
270 sl_free_bufs(sl);
271 diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
272 index c2c15e4..379d72b 100644
273 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
274 +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
275 @@ -288,6 +288,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data) {
276 /* toggle the LRO feature*/
277 netdev->features ^= NETIF_F_LRO;
278
279 + /* Update private LRO flag */
280 + adapter->lro = lro_requested;
281 +
282 /* update harware LRO capability accordingly */
283 if (lro_requested)
284 adapter->shared->devRead.misc.uptFeatures &= UPT1_F_LRO;
285 diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
286 index 0a324dc..b1c41f7 100644
287 --- a/drivers/net/wireless/libertas/cmd.c
288 +++ b/drivers/net/wireless/libertas/cmd.c
289 @@ -1758,8 +1758,8 @@ int lbs_execute_next_command(struct lbs_private *priv)
290 cpu_to_le16(CMD_SUBCMD_EXIT_PS)) {
291 lbs_deb_host(
292 "EXEC_NEXT_CMD: ignore ENTER_PS cmd\n");
293 - list_del(&cmdnode->list);
294 spin_lock_irqsave(&priv->driver_lock, flags);
295 + list_del(&cmdnode->list);
296 lbs_complete_command(priv, cmdnode, 0);
297 spin_unlock_irqrestore(&priv->driver_lock, flags);
298
299 @@ -1771,8 +1771,8 @@ int lbs_execute_next_command(struct lbs_private *priv)
300 (priv->psstate == PS_STATE_PRE_SLEEP)) {
301 lbs_deb_host(
302 "EXEC_NEXT_CMD: ignore EXIT_PS cmd in sleep\n");
303 - list_del(&cmdnode->list);
304 spin_lock_irqsave(&priv->driver_lock, flags);
305 + list_del(&cmdnode->list);
306 lbs_complete_command(priv, cmdnode, 0);
307 spin_unlock_irqrestore(&priv->driver_lock, flags);
308 priv->needtowakeup = 1;
309 @@ -1785,7 +1785,9 @@ int lbs_execute_next_command(struct lbs_private *priv)
310 "EXEC_NEXT_CMD: sending EXIT_PS\n");
311 }
312 }
313 + spin_lock_irqsave(&priv->driver_lock, flags);
314 list_del(&cmdnode->list);
315 + spin_unlock_irqrestore(&priv->driver_lock, flags);
316 lbs_deb_host("EXEC_NEXT_CMD: sending command 0x%04x\n",
317 le16_to_cpu(cmd->command));
318 lbs_submit_command(priv, cmdnode);
319 diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
320 index 81c753a..25e720c 100644
321 --- a/drivers/net/zorro8390.c
322 +++ b/drivers/net/zorro8390.c
323 @@ -125,7 +125,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z,
324
325 board = z->resource.start;
326 ioaddr = board+cards[i].offset;
327 - dev = alloc_ei_netdev();
328 + dev = ____alloc_ei_netdev(0);
329 if (!dev)
330 return -ENOMEM;
331 if (!request_mem_region(ioaddr, NE_IO_EXTENT*2, DRV_NAME)) {
332 @@ -145,15 +145,15 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z,
333 static const struct net_device_ops zorro8390_netdev_ops = {
334 .ndo_open = zorro8390_open,
335 .ndo_stop = zorro8390_close,
336 - .ndo_start_xmit = ei_start_xmit,
337 - .ndo_tx_timeout = ei_tx_timeout,
338 - .ndo_get_stats = ei_get_stats,
339 - .ndo_set_multicast_list = ei_set_multicast_list,
340 + .ndo_start_xmit = __ei_start_xmit,
341 + .ndo_tx_timeout = __ei_tx_timeout,
342 + .ndo_get_stats = __ei_get_stats,
343 + .ndo_set_multicast_list = __ei_set_multicast_list,
344 .ndo_validate_addr = eth_validate_addr,
345 .ndo_set_mac_address = eth_mac_addr,
346 .ndo_change_mtu = eth_change_mtu,
347 #ifdef CONFIG_NET_POLL_CONTROLLER
348 - .ndo_poll_controller = ei_poll,
349 + .ndo_poll_controller = __ei_poll,
350 #endif
351 };
352
353 diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
354 index 202fa0f..4709052 100644
355 --- a/drivers/scsi/megaraid/megaraid_sas.c
356 +++ b/drivers/scsi/megaraid/megaraid_sas.c
357 @@ -3072,6 +3072,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
358 * For each user buffer, create a mirror buffer and copy in
359 */
360 for (i = 0; i < ioc->sge_count; i++) {
361 + if (!ioc->sgl[i].iov_len)
362 + continue;
363 +
364 kbuff_arr[i] = dma_alloc_coherent(&instance->pdev->dev,
365 ioc->sgl[i].iov_len,
366 &buf_handle, GFP_KERNEL);
367 diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
368 index 7df5937..6234417 100644
369 --- a/fs/cifs/connect.c
370 +++ b/fs/cifs/connect.c
371 @@ -799,8 +799,7 @@ static int
372 cifs_parse_mount_options(char *options, const char *devname,
373 struct smb_vol *vol)
374 {
375 - char *value;
376 - char *data;
377 + char *value, *data, *end;
378 unsigned int temp_len, i, j;
379 char separator[2];
380 short int override_uid = -1;
381 @@ -843,6 +842,7 @@ cifs_parse_mount_options(char *options, const char *devname,
382 if (!options)
383 return 1;
384
385 + end = options + strlen(options);
386 if (strncmp(options, "sep=", 4) == 0) {
387 if (options[4] != 0) {
388 separator[0] = options[4];
389 @@ -907,6 +907,7 @@ cifs_parse_mount_options(char *options, const char *devname,
390 the only illegal character in a password is null */
391
392 if ((value[temp_len] == 0) &&
393 + (value + temp_len < end) &&
394 (value[temp_len+1] == separator[0])) {
395 /* reinsert comma */
396 value[temp_len] = separator[0];
397 @@ -2230,6 +2231,11 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon,
398 0 /* not legacy */, cifs_sb->local_nls,
399 cifs_sb->mnt_cifs_flags &
400 CIFS_MOUNT_MAP_SPECIAL_CHR);
401 +
402 + if (rc == -EOPNOTSUPP || rc == -EINVAL)
403 + rc = SMBQueryInformation(xid, tcon, full_path, pfile_info,
404 + cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
405 + CIFS_MOUNT_MAP_SPECIAL_CHR);
406 kfree(pfile_info);
407 return rc;
408 }
409 diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
410 index 6d6ff4f..20ae71b 100644
411 --- a/fs/cifs/sess.c
412 +++ b/fs/cifs/sess.c
413 @@ -906,7 +906,9 @@ ssetup_ntlmssp_authenticate:
414 }
415
416 /* BB check if Unicode and decode strings */
417 - if (smb_buf->Flags2 & SMBFLG2_UNICODE) {
418 + if (bytes_remaining == 0) {
419 + /* no string area to decode, do nothing */
420 + } else if (smb_buf->Flags2 & SMBFLG2_UNICODE) {
421 /* unicode string area must be word-aligned */
422 if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) {
423 ++bcc_ptr;
424 diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c
425 index 49cfd5f..2aac776 100644
426 --- a/fs/partitions/efi.c
427 +++ b/fs/partitions/efi.c
428 @@ -349,6 +349,12 @@ is_gpt_valid(struct block_device *bdev, u64 lba,
429 goto fail;
430 }
431
432 + /* Check that sizeof_partition_entry has the correct value */
433 + if (le32_to_cpu((*gpt)->sizeof_partition_entry) != sizeof(gpt_entry)) {
434 + pr_debug("GUID Partitition Entry Size check failed.\n");
435 + goto fail;
436 + }
437 +
438 if (!(*ptes = alloc_read_gpt_entries(bdev, *gpt)))
439 goto fail;
440
441 diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
442 index f8b0f96..bf4fe98 100644
443 --- a/kernel/time/clocksource.c
444 +++ b/kernel/time/clocksource.c
445 @@ -561,8 +561,8 @@ int clocksource_register(struct clocksource *cs)
446
447 mutex_lock(&clocksource_mutex);
448 clocksource_enqueue(cs);
449 - clocksource_select();
450 clocksource_enqueue_watchdog(cs);
451 + clocksource_select();
452 mutex_unlock(&clocksource_mutex);
453 return 0;
454 }
455 diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
456 index 49446b1..8917fd3 100644
457 --- a/kernel/time/tick-broadcast.c
458 +++ b/kernel/time/tick-broadcast.c
459 @@ -523,10 +523,11 @@ static void tick_broadcast_init_next_event(struct cpumask *mask,
460 */
461 void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
462 {
463 + int cpu = smp_processor_id();
464 +
465 /* Set it up only once ! */
466 if (bc->event_handler != tick_handle_oneshot_broadcast) {
467 int was_periodic = bc->mode == CLOCK_EVT_MODE_PERIODIC;
468 - int cpu = smp_processor_id();
469
470 bc->event_handler = tick_handle_oneshot_broadcast;
471 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
472 @@ -552,6 +553,15 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
473 tick_broadcast_set_event(tick_next_period, 1);
474 } else
475 bc->next_event.tv64 = KTIME_MAX;
476 + } else {
477 + /*
478 + * The first cpu which switches to oneshot mode sets
479 + * the bit for all other cpus which are in the general
480 + * (periodic) broadcast mask. So the bit is set and
481 + * would prevent the first broadcast enter after this
482 + * to program the bc device.
483 + */
484 + tick_broadcast_clear_oneshot(cpu);
485 }
486 }
487
488 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
489 index 26e2f37..f5e362f 100644
490 --- a/kernel/time/timekeeping.c
491 +++ b/kernel/time/timekeeping.c
492 @@ -168,8 +168,15 @@ int __read_mostly timekeeping_suspended;
493 static struct timespec xtime_cache __attribute__ ((aligned (16)));
494 void update_xtime_cache(u64 nsec)
495 {
496 - xtime_cache = xtime;
497 - timespec_add_ns(&xtime_cache, nsec);
498 + /*
499 + * Use temporary variable so get_seconds() cannot catch
500 + * an intermediate xtime_cache.tv_sec value.
501 + * The ACCESS_ONCE() keeps the compiler from optimizing
502 + * out the intermediate value.
503 + */
504 + struct timespec ts = xtime;
505 + timespec_add_ns(&ts, nsec);
506 + ACCESS_ONCE(xtime_cache) = ts;
507 }
508
509 /* must hold xtime_lock */
510 diff --git a/net/dccp/options.c b/net/dccp/options.c
511 index 1b08cae..b4a853e 100644
512 --- a/net/dccp/options.c
513 +++ b/net/dccp/options.c
514 @@ -131,6 +131,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
515 case DCCPO_CHANGE_L ... DCCPO_CONFIRM_R:
516 if (pkt_type == DCCP_PKT_DATA) /* RFC 4340, 6 */
517 break;
518 + if (len == 0)
519 + goto out_invalid_option;
520 rc = dccp_feat_parse_options(sk, dreq, mandatory, opt,
521 *value, value + 1, len - 1);
522 if (rc)

  ViewVC Help
Powered by ViewVC 1.1.20