Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0148-2.6.27.49-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1176 - (show annotations) (download)
Thu Oct 14 15:11:06 2010 UTC (14 years ago) by niro
File size: 18086 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
2 index 34bc987..d8a4dc6 100644
3 --- a/arch/x86/kernel/pci-calgary_64.c
4 +++ b/arch/x86/kernel/pci-calgary_64.c
5 @@ -102,11 +102,16 @@ int use_calgary __read_mostly = 0;
6 #define PMR_SOFTSTOPFAULT 0x40000000
7 #define PMR_HARDSTOP 0x20000000
8
9 -#define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */
10 -#define MAX_NUM_CHASSIS 8 /* max number of chassis */
11 -/* MAX_PHB_BUS_NUM is the maximal possible dev->bus->number */
12 -#define MAX_PHB_BUS_NUM (MAX_NUM_OF_PHBS * MAX_NUM_CHASSIS * 2)
13 -#define PHBS_PER_CALGARY 4
14 +/*
15 + * The maximum PHB bus number.
16 + * x3950M2 (rare): 8 chassis, 48 PHBs per chassis = 384
17 + * x3950M2: 4 chassis, 48 PHBs per chassis = 192
18 + * x3950 (PCIE): 8 chassis, 32 PHBs per chassis = 256
19 + * x3950 (PCIX): 8 chassis, 16 PHBs per chassis = 128
20 + */
21 +#define MAX_PHB_BUS_NUM 256
22 +
23 +#define PHBS_PER_CALGARY 4
24
25 /* register offsets in Calgary's internal register space */
26 static const unsigned long tar_offsets[] = {
27 @@ -1092,8 +1097,6 @@ static int __init calgary_init_one(struct pci_dev *dev)
28 struct iommu_table *tbl;
29 int ret;
30
31 - BUG_ON(dev->bus->number >= MAX_PHB_BUS_NUM);
32 -
33 bbar = busno_to_bbar(dev->bus->number);
34 ret = calgary_setup_tar(dev, bbar);
35 if (ret)
36 diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
37 index 7495c52..e144ad8 100644
38 --- a/drivers/char/agp/amd64-agp.c
39 +++ b/drivers/char/agp/amd64-agp.c
40 @@ -491,6 +491,10 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
41 u8 cap_ptr;
42 int err;
43
44 + /* The Highlander principle */
45 + if (agp_bridges_found)
46 + return -ENODEV;
47 +
48 cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
49 if (!cap_ptr)
50 return -ENODEV;
51 @@ -554,6 +558,8 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev)
52 amd64_aperture_sizes[bridge->aperture_size_idx].size);
53 agp_remove_bridge(bridge);
54 agp_put_bridge(bridge);
55 +
56 + agp_bridges_found--;
57 }
58
59 #ifdef CONFIG_PM
60 @@ -701,6 +707,11 @@ static struct pci_device_id agp_amd64_pci_table[] = {
61
62 MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
63
64 +static DEFINE_PCI_DEVICE_TABLE(agp_amd64_pci_promisc_table) = {
65 + { PCI_DEVICE_CLASS(0, 0) },
66 + { }
67 +};
68 +
69 static struct pci_driver agp_amd64_pci_driver = {
70 .name = "agpgart-amd64",
71 .id_table = agp_amd64_pci_table,
72 @@ -725,7 +736,6 @@ int __init agp_amd64_init(void)
73 return err;
74
75 if (agp_bridges_found == 0) {
76 - struct pci_dev *dev;
77 if (!agp_try_unsupported && !agp_try_unsupported_boot) {
78 printk(KERN_INFO PFX "No supported AGP bridge found.\n");
79 #ifdef MODULE
80 @@ -741,17 +751,10 @@ int __init agp_amd64_init(void)
81 return -ENODEV;
82
83 /* Look for any AGP bridge */
84 - dev = NULL;
85 - err = -ENODEV;
86 - for_each_pci_dev(dev) {
87 - if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
88 - continue;
89 - /* Only one bridge supported right now */
90 - if (agp_amd64_probe(dev, NULL) == 0) {
91 - err = 0;
92 - break;
93 - }
94 - }
95 + agp_amd64_pci_driver.id_table = agp_amd64_pci_promisc_table;
96 + err = driver_attach(&agp_amd64_pci_driver.driver);
97 + if (err == 0 && agp_bridges_found == 0)
98 + err = -ENODEV;
99 }
100 return err;
101 }
102 diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
103 index 2b8f439..a7f98c9 100644
104 --- a/drivers/hwmon/coretemp.c
105 +++ b/drivers/hwmon/coretemp.c
106 @@ -52,6 +52,7 @@ struct coretemp_data {
107 struct mutex update_lock;
108 const char *name;
109 u32 id;
110 + u16 core_id;
111 char valid; /* zero until following fields are valid */
112 unsigned long last_updated; /* in jiffies */
113 int temp;
114 @@ -74,7 +75,7 @@ static ssize_t show_name(struct device *dev, struct device_attribute
115 if (attr->index == SHOW_NAME)
116 ret = sprintf(buf, "%s\n", data->name);
117 else /* show label */
118 - ret = sprintf(buf, "Core %d\n", data->id);
119 + ret = sprintf(buf, "Core %d\n", data->core_id);
120 return ret;
121 }
122
123 @@ -216,6 +217,9 @@ static int __devinit coretemp_probe(struct platform_device *pdev)
124 }
125
126 data->id = pdev->id;
127 +#ifdef CONFIG_SMP
128 + data->core_id = c->cpu_core_id;
129 +#endif
130 data->name = "coretemp";
131 mutex_init(&data->update_lock);
132
133 @@ -313,6 +317,10 @@ struct pdev_entry {
134 struct list_head list;
135 struct platform_device *pdev;
136 unsigned int cpu;
137 +#ifdef CONFIG_SMP
138 + u16 phys_proc_id;
139 + u16 cpu_core_id;
140 +#endif
141 };
142
143 static LIST_HEAD(pdev_list);
144 @@ -323,6 +331,22 @@ static int __cpuinit coretemp_device_add(unsigned int cpu)
145 int err;
146 struct platform_device *pdev;
147 struct pdev_entry *pdev_entry;
148 +#ifdef CONFIG_SMP
149 + struct cpuinfo_x86 *c = &cpu_data(cpu);
150 +#endif
151 +
152 + mutex_lock(&pdev_list_mutex);
153 +
154 +#ifdef CONFIG_SMP
155 + /* Skip second HT entry of each core */
156 + list_for_each_entry(pdev_entry, &pdev_list, list) {
157 + if (c->phys_proc_id == pdev_entry->phys_proc_id &&
158 + c->cpu_core_id == pdev_entry->cpu_core_id) {
159 + err = 0; /* Not an error */
160 + goto exit;
161 + }
162 + }
163 +#endif
164
165 pdev = platform_device_alloc(DRVNAME, cpu);
166 if (!pdev) {
167 @@ -346,7 +370,10 @@ static int __cpuinit coretemp_device_add(unsigned int cpu)
168
169 pdev_entry->pdev = pdev;
170 pdev_entry->cpu = cpu;
171 - mutex_lock(&pdev_list_mutex);
172 +#ifdef CONFIG_SMP
173 + pdev_entry->phys_proc_id = c->phys_proc_id;
174 + pdev_entry->cpu_core_id = c->cpu_core_id;
175 +#endif
176 list_add_tail(&pdev_entry->list, &pdev_list);
177 mutex_unlock(&pdev_list_mutex);
178
179 @@ -357,6 +384,7 @@ exit_device_free:
180 exit_device_put:
181 platform_device_put(pdev);
182 exit:
183 + mutex_unlock(&pdev_list_mutex);
184 return err;
185 }
186
187 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
188 index e9ca3cb..fb97c42 100644
189 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
190 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
191 @@ -1158,7 +1158,7 @@ static ssize_t create_child(struct device *dev,
192
193 return ret ? ret : count;
194 }
195 -static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
196 +static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
197
198 static ssize_t delete_child(struct device *dev,
199 struct device_attribute *attr,
200 @@ -1178,7 +1178,7 @@ static ssize_t delete_child(struct device *dev,
201 return ret ? ret : count;
202
203 }
204 -static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
205 +static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
206
207 int ipoib_add_pkey_attr(struct net_device *dev)
208 {
209 diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
210 index 598d2e9..b91eb58 100644
211 --- a/drivers/net/bonding/bond_main.c
212 +++ b/drivers/net/bonding/bond_main.c
213 @@ -1705,6 +1705,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
214 case BOND_MODE_ALB:
215 new_slave->state = BOND_STATE_ACTIVE;
216 bond_set_slave_inactive_flags(new_slave);
217 + bond_select_active_slave(bond);
218 break;
219 default:
220 dprintk("This slave is always active in trunk mode\n");
221 diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
222 index ec6b0af..5cbdd37 100644
223 --- a/drivers/net/cpmac.c
224 +++ b/drivers/net/cpmac.c
225 @@ -1174,7 +1174,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
226 if (netif_msg_drv(priv))
227 printk(KERN_ERR "%s: Could not attach to PHY\n",
228 dev->name);
229 - return PTR_ERR(priv->phy);
230 + rc = PTR_ERR(priv->phy);
231 + goto fail;
232 }
233
234 if ((rc = register_netdev(dev))) {
235 diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
236 index aa9ff46..50e32df 100644
237 --- a/drivers/net/sky2.c
238 +++ b/drivers/net/sky2.c
239 @@ -688,11 +688,24 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port)
240 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
241 }
242
243 +/* Enable Rx/Tx */
244 +static void sky2_enable_rx_tx(struct sky2_port *sky2)
245 +{
246 + struct sky2_hw *hw = sky2->hw;
247 + unsigned port = sky2->port;
248 + u16 reg;
249 +
250 + reg = gma_read16(hw, port, GM_GP_CTRL);
251 + reg |= GM_GPCR_RX_ENA | GM_GPCR_TX_ENA;
252 + gma_write16(hw, port, GM_GP_CTRL, reg);
253 +}
254 +
255 /* Force a renegotiation */
256 static void sky2_phy_reinit(struct sky2_port *sky2)
257 {
258 spin_lock_bh(&sky2->phy_lock);
259 sky2_phy_init(sky2->hw, sky2->port);
260 + sky2_enable_rx_tx(sky2);
261 spin_unlock_bh(&sky2->phy_lock);
262 }
263
264 @@ -1862,7 +1875,6 @@ static void sky2_link_up(struct sky2_port *sky2)
265 {
266 struct sky2_hw *hw = sky2->hw;
267 unsigned port = sky2->port;
268 - u16 reg;
269 static const char *fc_name[] = {
270 [FC_NONE] = "none",
271 [FC_TX] = "tx",
272 @@ -1870,10 +1882,7 @@ static void sky2_link_up(struct sky2_port *sky2)
273 [FC_BOTH] = "both",
274 };
275
276 - /* enable Rx/Tx */
277 - reg = gma_read16(hw, port, GM_GP_CTRL);
278 - reg |= GM_GPCR_RX_ENA | GM_GPCR_TX_ENA;
279 - gma_write16(hw, port, GM_GP_CTRL, reg);
280 + sky2_enable_rx_tx(sky2);
281
282 gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
283
284 diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
285 index 3b4e55c..055e991 100644
286 --- a/drivers/net/wireless/hostap/hostap_cs.c
287 +++ b/drivers/net/wireless/hostap/hostap_cs.c
288 @@ -557,6 +557,7 @@ static int prism2_config(struct pcmcia_device *link)
289 config_info_t conf;
290 cistpl_cftable_entry_t dflt = { 0 };
291 struct hostap_cs_priv *hw_priv;
292 + unsigned long flags;
293
294 PDEBUG(DEBUG_FLOW, "prism2_config()\n");
295
296 @@ -688,6 +689,12 @@ static int prism2_config(struct pcmcia_device *link)
297 link->dev_node = &hw_priv->node;
298
299 /*
300 + * Make sure the IRQ handler cannot proceed until at least
301 + * dev->base_addr is initialized.
302 + */
303 + spin_lock_irqsave(&local->irq_init_lock, flags);
304 +
305 + /*
306 * Allocate an interrupt line. Note that this does not assign a
307 * handler to the interrupt, unless the 'Handler' member of the
308 * irq structure is initialized.
309 @@ -712,6 +719,8 @@ static int prism2_config(struct pcmcia_device *link)
310 dev->irq = link->irq.AssignedIRQ;
311 dev->base_addr = link->io.BasePort1;
312
313 + spin_unlock_irqrestore(&local->irq_init_lock, flags);
314 +
315 /* Finally, report what we've done */
316 printk(KERN_INFO "%s: index 0x%02x: ",
317 dev_info, link->conf.ConfigIndex);
318 @@ -742,6 +751,7 @@ static int prism2_config(struct pcmcia_device *link)
319 return ret;
320
321 cs_failed:
322 + spin_unlock_irqrestore(&local->irq_init_lock, flags);
323 cs_error(link, last_fn, last_ret);
324
325 failed:
326 diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
327 index 3153fe9..04b890f 100644
328 --- a/drivers/net/wireless/hostap/hostap_hw.c
329 +++ b/drivers/net/wireless/hostap/hostap_hw.c
330 @@ -2631,6 +2631,18 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
331 iface = netdev_priv(dev);
332 local = iface->local;
333
334 + /* Detect early interrupt before driver is fully configued */
335 + spin_lock(&local->irq_init_lock);
336 + if (!dev->base_addr) {
337 + if (net_ratelimit()) {
338 + printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n",
339 + dev->name);
340 + }
341 + spin_unlock(&local->irq_init_lock);
342 + return IRQ_HANDLED;
343 + }
344 + spin_unlock(&local->irq_init_lock);
345 +
346 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
347
348 if (local->func->card_present && !local->func->card_present(local)) {
349 @@ -3187,6 +3199,7 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
350 spin_lock_init(&local->cmdlock);
351 spin_lock_init(&local->baplock);
352 spin_lock_init(&local->lock);
353 + spin_lock_init(&local->irq_init_lock);
354 mutex_init(&local->rid_bap_mtx);
355
356 if (card_idx < 0 || card_idx >= MAX_PARM_DEVICES)
357 diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
358 index a68f97c..1c986f2 100644
359 --- a/drivers/net/wireless/hostap/hostap_wlan.h
360 +++ b/drivers/net/wireless/hostap/hostap_wlan.h
361 @@ -653,7 +653,7 @@ struct local_info {
362 rwlock_t iface_lock; /* hostap_interfaces read lock; use write lock
363 * when removing entries from the list.
364 * TX and RX paths can use read lock. */
365 - spinlock_t cmdlock, baplock, lock;
366 + spinlock_t cmdlock, baplock, lock, irq_init_lock;
367 struct mutex rid_bap_mtx;
368 u16 infofid; /* MAC buffer id for info frame */
369 /* txfid, intransmitfid, next_txtid, and next_alloc are protected by
370 diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
371 index a735526..a7b7da1 100644
372 --- a/drivers/scsi/aacraid/commctrl.c
373 +++ b/drivers/scsi/aacraid/commctrl.c
374 @@ -645,9 +645,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
375 /* Does this really need to be GFP_DMA? */
376 p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA);
377 if(!p) {
378 - kfree (usg);
379 - dprintk((KERN_DEBUG"aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
380 + dprintk((KERN_DEBUG "aacraid: Could not allocate SG buffer - size = %d buffer number %d of %d\n",
381 usg->sg[i].count,i,usg->count));
382 + kfree(usg);
383 rcode = -ENOMEM;
384 goto cleanup;
385 }
386 diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
387 index cff0c53..31a1668 100644
388 --- a/fs/cifs/cifssmb.c
389 +++ b/fs/cifs/cifssmb.c
390 @@ -1594,6 +1594,14 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
391 *nbytes = le16_to_cpu(pSMBr->CountHigh);
392 *nbytes = (*nbytes) << 16;
393 *nbytes += le16_to_cpu(pSMBr->Count);
394 +
395 + /*
396 + * Mask off high 16 bits when bytes written as returned by the
397 + * server is greater than bytes requested by the client. Some
398 + * OS/2 servers are known to set incorrect CountHigh values.
399 + */
400 + if (*nbytes > count)
401 + *nbytes &= 0xFFFF;
402 }
403
404 cifs_buf_release(pSMB);
405 @@ -1679,6 +1687,14 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
406 *nbytes = le16_to_cpu(pSMBr->CountHigh);
407 *nbytes = (*nbytes) << 16;
408 *nbytes += le16_to_cpu(pSMBr->Count);
409 +
410 + /*
411 + * Mask off high 16 bits when bytes written as returned by the
412 + * server is greater than bytes requested by the client. OS/2
413 + * servers are known to set incorrect CountHigh values.
414 + */
415 + if (*nbytes > count)
416 + *nbytes &= 0xFFFF;
417 }
418
419 /* cifs_small_buf_release(pSMB); */ /* Freed earlier now in SendReceive2 */
420 diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
421 index 3890cc2..52c72ea 100644
422 --- a/fs/cifs/sess.c
423 +++ b/fs/cifs/sess.c
424 @@ -482,15 +482,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
425
426 /* calculate session key */
427 setup_ntlmv2_rsp(ses, v2_sess_key, nls_cp);
428 - if (first_time) /* should this be moved into common code
429 - with similar ntlmv2 path? */
430 - /* cifs_calculate_ntlmv2_mac_key(ses->server->mac_signing_key,
431 - response BB FIXME, v2_sess_key); */
432 -
433 - /* copy session key */
434 -
435 - /* memcpy(bcc_ptr, (char *)ntlm_session_key,LM2_SESS_KEY_SIZE);
436 - bcc_ptr += LM2_SESS_KEY_SIZE; */
437 + /* FIXME: calculate MAC key */
438 memcpy(bcc_ptr, (char *)v2_sess_key,
439 sizeof(struct ntlmv2_resp));
440 bcc_ptr += sizeof(struct ntlmv2_resp);
441 diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c
442 index 1b5c200..517bd46 100644
443 --- a/fs/ecryptfs/messaging.c
444 +++ b/fs/ecryptfs/messaging.c
445 @@ -30,9 +30,9 @@ static struct mutex ecryptfs_msg_ctx_lists_mux;
446
447 static struct hlist_head *ecryptfs_daemon_hash;
448 struct mutex ecryptfs_daemon_hash_mux;
449 -static int ecryptfs_hash_buckets;
450 +static int ecryptfs_hash_bits;
451 #define ecryptfs_uid_hash(uid) \
452 - hash_long((unsigned long)uid, ecryptfs_hash_buckets)
453 + hash_long((unsigned long)uid, ecryptfs_hash_bits)
454
455 static u32 ecryptfs_msg_counter;
456 static struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr;
457 @@ -599,18 +599,19 @@ int ecryptfs_init_messaging(unsigned int transport)
458 }
459 mutex_init(&ecryptfs_daemon_hash_mux);
460 mutex_lock(&ecryptfs_daemon_hash_mux);
461 - ecryptfs_hash_buckets = 1;
462 - while (ecryptfs_number_of_users >> ecryptfs_hash_buckets)
463 - ecryptfs_hash_buckets++;
464 + ecryptfs_hash_bits = 1;
465 + while (ecryptfs_number_of_users >> ecryptfs_hash_bits)
466 + ecryptfs_hash_bits++;
467 ecryptfs_daemon_hash = kmalloc((sizeof(struct hlist_head)
468 - * ecryptfs_hash_buckets), GFP_KERNEL);
469 + * (1 << ecryptfs_hash_bits)),
470 + GFP_KERNEL);
471 if (!ecryptfs_daemon_hash) {
472 rc = -ENOMEM;
473 printk(KERN_ERR "%s: Failed to allocate memory\n", __func__);
474 mutex_unlock(&ecryptfs_daemon_hash_mux);
475 goto out;
476 }
477 - for (i = 0; i < ecryptfs_hash_buckets; i++)
478 + for (i = 0; i < (1 << ecryptfs_hash_bits); i++)
479 INIT_HLIST_HEAD(&ecryptfs_daemon_hash[i]);
480 mutex_unlock(&ecryptfs_daemon_hash_mux);
481 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx)
482 @@ -680,7 +681,7 @@ void ecryptfs_release_messaging(unsigned int transport)
483 int i;
484
485 mutex_lock(&ecryptfs_daemon_hash_mux);
486 - for (i = 0; i < ecryptfs_hash_buckets; i++) {
487 + for (i = 0; i < (1 << ecryptfs_hash_bits); i++) {
488 int rc;
489
490 hlist_for_each_entry(daemon, elem,
491 diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
492 index 408f743..a4cb9d1 100644
493 --- a/include/math-emu/op-common.h
494 +++ b/include/math-emu/op-common.h
495 @@ -793,7 +793,7 @@ do { \
496 X##_e -= (_FP_W_TYPE_SIZE - rsize); \
497 X##_e = rsize - X##_e - 1; \
498 \
499 - if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \
500 + if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \
501 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
502 _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
503 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
504 diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
505 index 44c8d65..1be1a6c 100644
506 --- a/net/ipv6/netfilter/ip6t_REJECT.c
507 +++ b/net/ipv6/netfilter/ip6t_REJECT.c
508 @@ -95,9 +95,11 @@ static void send_reset(struct sk_buff *oldskb)
509 fl.fl_ip_dport = otcph.source;
510 security_skb_classify_flow(oldskb, &fl);
511 dst = ip6_route_output(&init_net, NULL, &fl);
512 - if (dst == NULL)
513 + if (dst == NULL || dst->error) {
514 + dst_release(dst);
515 return;
516 - if (dst->error || xfrm_lookup(&dst, &fl, NULL, 0))
517 + }
518 + if (xfrm_lookup(&dst, &fl, NULL, 0))
519 return;
520
521 hh_len = (dst->dev->hard_header_len + 15)&~15;
522 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
523 index f05e36a..78480c2 100644
524 --- a/scripts/mod/modpost.c
525 +++ b/scripts/mod/modpost.c
526 @@ -1292,7 +1292,7 @@ static unsigned int *reloc_location(struct elf_info *elf,
527 int section = sechdr->sh_info;
528
529 return (void *)elf->hdr + sechdrs[section].sh_offset +
530 - (r->r_offset - sechdrs[section].sh_addr);
531 + r->r_offset - sechdrs[section].sh_addr;
532 }
533
534 static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)