/[linux-patches]/genpatches-2.6/tags/3.0-30/1034_linux-3.0.35.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1034_linux-3.0.35.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (23 months, 1 week ago) by mpagano
File size: 25650 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index 61ef485..fe91076 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 34
9 +SUBLEVEL = 35
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
14 index f832773..449a7e0 100644
15 --- a/arch/powerpc/kernel/module_32.c
16 +++ b/arch/powerpc/kernel/module_32.c
17 @@ -187,8 +187,8 @@ int apply_relocate(Elf32_Shdr *sechdrs,
18
19 static inline int entry_matches(struct ppc_plt_entry *entry, Elf32_Addr val)
20 {
21 - if (entry->jump[0] == 0x3d600000 + ((val + 0x8000) >> 16)
22 - && entry->jump[1] == 0x396b0000 + (val & 0xffff))
23 + if (entry->jump[0] == 0x3d800000 + ((val + 0x8000) >> 16)
24 + && entry->jump[1] == 0x398c0000 + (val & 0xffff))
25 return 1;
26 return 0;
27 }
28 @@ -215,10 +215,9 @@ static uint32_t do_plt_call(void *location,
29 entry++;
30 }
31
32 - /* Stolen from Paul Mackerras as well... */
33 - entry->jump[0] = 0x3d600000+((val+0x8000)>>16); /* lis r11,sym@ha */
34 - entry->jump[1] = 0x396b0000 + (val&0xffff); /* addi r11,r11,sym@l*/
35 - entry->jump[2] = 0x7d6903a6; /* mtctr r11 */
36 + entry->jump[0] = 0x3d800000+((val+0x8000)>>16); /* lis r12,sym@ha */
37 + entry->jump[1] = 0x398c0000 + (val&0xffff); /* addi r12,r12,sym@l*/
38 + entry->jump[2] = 0x7d8903a6; /* mtctr r12 */
39 entry->jump[3] = 0x4e800420; /* bctr */
40
41 DEBUGP("Initialized plt for 0x%x at %p\n", val, entry);
42 diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
43 index be6d9e3..3470624 100644
44 --- a/arch/x86/crypto/aesni-intel_asm.S
45 +++ b/arch/x86/crypto/aesni-intel_asm.S
46 @@ -2460,10 +2460,12 @@ ENTRY(aesni_cbc_dec)
47 pxor IN3, STATE4
48 movaps IN4, IV
49 #else
50 - pxor (INP), STATE2
51 - pxor 0x10(INP), STATE3
52 pxor IN1, STATE4
53 movaps IN2, IV
54 + movups (INP), IN1
55 + pxor IN1, STATE2
56 + movups 0x10(INP), IN2
57 + pxor IN2, STATE3
58 #endif
59 movups STATE1, (OUTP)
60 movups STATE2, 0x10(OUTP)
61 diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
62 index bb0adad..dc4fb77 100644
63 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
64 +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
65 @@ -52,6 +52,7 @@ struct threshold_block {
66 unsigned int cpu;
67 u32 address;
68 u16 interrupt_enable;
69 + bool interrupt_capable;
70 u16 threshold_limit;
71 struct kobject kobj;
72 struct list_head miscj;
73 @@ -86,6 +87,21 @@ struct thresh_restart {
74 u16 old_limit;
75 };
76
77 +static bool lvt_interrupt_supported(unsigned int bank, u32 msr_high_bits)
78 +{
79 + /*
80 + * bank 4 supports APIC LVT interrupts implicitly since forever.
81 + */
82 + if (bank == 4)
83 + return true;
84 +
85 + /*
86 + * IntP: interrupt present; if this bit is set, the thresholding
87 + * bank can generate APIC LVT interrupts
88 + */
89 + return msr_high_bits & BIT(28);
90 +}
91 +
92 static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi)
93 {
94 int msr = (hi & MASK_LVTOFF_HI) >> 20;
95 @@ -107,8 +123,10 @@ static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi)
96 return 1;
97 };
98
99 -/* must be called with correct cpu affinity */
100 -/* Called via smp_call_function_single() */
101 +/*
102 + * Called via smp_call_function_single(), must be called with correct
103 + * cpu affinity.
104 + */
105 static void threshold_restart_bank(void *_tr)
106 {
107 struct thresh_restart *tr = _tr;
108 @@ -131,6 +149,12 @@ static void threshold_restart_bank(void *_tr)
109 (new_count & THRESHOLD_MAX);
110 }
111
112 + /* clear IntType */
113 + hi &= ~MASK_INT_TYPE_HI;
114 +
115 + if (!tr->b->interrupt_capable)
116 + goto done;
117 +
118 if (tr->set_lvt_off) {
119 if (lvt_off_valid(tr->b, tr->lvt_off, lo, hi)) {
120 /* set new lvt offset */
121 @@ -139,9 +163,10 @@ static void threshold_restart_bank(void *_tr)
122 }
123 }
124
125 - tr->b->interrupt_enable ?
126 - (hi = (hi & ~MASK_INT_TYPE_HI) | INT_TYPE_APIC) :
127 - (hi &= ~MASK_INT_TYPE_HI);
128 + if (tr->b->interrupt_enable)
129 + hi |= INT_TYPE_APIC;
130 +
131 + done:
132
133 hi |= MASK_COUNT_EN_HI;
134 wrmsr(tr->b->address, lo, hi);
135 @@ -206,14 +231,18 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
136 if (shared_bank[bank] && c->cpu_core_id)
137 break;
138 #endif
139 - offset = setup_APIC_mce(offset,
140 - (high & MASK_LVTOFF_HI) >> 20);
141
142 memset(&b, 0, sizeof(b));
143 - b.cpu = cpu;
144 - b.bank = bank;
145 - b.block = block;
146 - b.address = address;
147 + b.cpu = cpu;
148 + b.bank = bank;
149 + b.block = block;
150 + b.address = address;
151 + b.interrupt_capable = lvt_interrupt_supported(bank, high);
152 +
153 + if (b.interrupt_capable) {
154 + int new = (high & MASK_LVTOFF_HI) >> 20;
155 + offset = setup_APIC_mce(offset, new);
156 + }
157
158 mce_threshold_block_init(&b, offset);
159 mce_threshold_vector = amd_threshold_interrupt;
160 @@ -313,6 +342,9 @@ store_interrupt_enable(struct threshold_block *b, const char *buf, size_t size)
161 struct thresh_restart tr;
162 unsigned long new;
163
164 + if (!b->interrupt_capable)
165 + return -EINVAL;
166 +
167 if (strict_strtoul(buf, 0, &new) < 0)
168 return -EINVAL;
169
170 @@ -471,6 +503,7 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
171 b->cpu = cpu;
172 b->address = address;
173 b->interrupt_enable = 0;
174 + b->interrupt_capable = lvt_interrupt_supported(bank, high);
175 b->threshold_limit = THRESHOLD_MAX;
176
177 INIT_LIST_HEAD(&b->miscj);
178 diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
179 index db39e9e..623a335 100644
180 --- a/drivers/acpi/video.c
181 +++ b/drivers/acpi/video.c
182 @@ -1732,6 +1732,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
183
184 static int __init intel_opregion_present(void)
185 {
186 + int i915 = 0;
187 #if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
188 struct pci_dev *dev = NULL;
189 u32 address;
190 @@ -1744,10 +1745,10 @@ static int __init intel_opregion_present(void)
191 pci_read_config_dword(dev, 0xfc, &address);
192 if (!address)
193 continue;
194 - return 1;
195 + i915 = 1;
196 }
197 #endif
198 - return 0;
199 + return i915;
200 }
201
202 int acpi_video_register(void)
203 diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
204 index b427711..58b49d1 100644
205 --- a/drivers/char/agp/intel-agp.c
206 +++ b/drivers/char/agp/intel-agp.c
207 @@ -897,6 +897,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
208 ID(PCI_DEVICE_ID_INTEL_B43_HB),
209 ID(PCI_DEVICE_ID_INTEL_B43_1_HB),
210 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB),
211 + ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB),
212 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB),
213 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB),
214 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB),
215 diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h
216 index 5da67f1..6f24604 100644
217 --- a/drivers/char/agp/intel-agp.h
218 +++ b/drivers/char/agp/intel-agp.h
219 @@ -211,6 +211,7 @@
220 #define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30
221 #define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32
222 #define PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB 0x0040
223 +#define PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB 0x0069
224 #define PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG 0x0042
225 #define PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB 0x0044
226 #define PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB 0x0062
227 diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
228 index 9a4c3ab..e8e18ca 100644
229 --- a/drivers/hwmon/fam15h_power.c
230 +++ b/drivers/hwmon/fam15h_power.c
231 @@ -61,14 +61,14 @@ static ssize_t show_power(struct device *dev,
232 REG_TDP_RUNNING_AVERAGE, &val);
233 running_avg_capture = (val >> 4) & 0x3fffff;
234 running_avg_capture = sign_extend32(running_avg_capture, 21);
235 - running_avg_range = val & 0xf;
236 + running_avg_range = (val & 0xf) + 1;
237
238 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5),
239 REG_TDP_LIMIT3, &val);
240
241 tdp_limit = val >> 16;
242 - curr_pwr_watts = tdp_limit + data->base_tdp -
243 - (s32)(running_avg_capture >> (running_avg_range + 1));
244 + curr_pwr_watts = (tdp_limit + data->base_tdp) << running_avg_range;
245 + curr_pwr_watts -= running_avg_capture;
246 curr_pwr_watts *= data->tdp_to_watts;
247
248 /*
249 @@ -78,7 +78,7 @@ static ssize_t show_power(struct device *dev,
250 * scaling factor 1/(2^16). For conversion we use
251 * (10^6)/(2^16) = 15625/(2^10)
252 */
253 - curr_pwr_watts = (curr_pwr_watts * 15625) >> 10;
254 + curr_pwr_watts = (curr_pwr_watts * 15625) >> (10 + running_avg_range);
255 return sprintf(buf, "%u\n", (unsigned int) curr_pwr_watts);
256 }
257 static DEVICE_ATTR(power1_input, S_IRUGO, show_power, NULL);
258 diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
259 index 7e5cc0b..1f8a824 100644
260 --- a/drivers/net/can/c_can/c_can.c
261 +++ b/drivers/net/can/c_can/c_can.c
262 @@ -688,7 +688,7 @@ static int c_can_get_berr_counter(const struct net_device *dev,
263 *
264 * We iterate from priv->tx_echo to priv->tx_next and check if the
265 * packet has been transmitted, echo it back to the CAN framework.
266 - * If we discover a not yet transmitted package, stop looking for more.
267 + * If we discover a not yet transmitted packet, stop looking for more.
268 */
269 static void c_can_do_tx(struct net_device *dev)
270 {
271 @@ -700,7 +700,7 @@ static void c_can_do_tx(struct net_device *dev)
272 for (/* nix */; (priv->tx_next - priv->tx_echo) > 0; priv->tx_echo++) {
273 msg_obj_no = get_tx_echo_msg_obj(priv);
274 val = c_can_read_reg32(priv, &priv->regs->txrqst1);
275 - if (!(val & (1 << msg_obj_no))) {
276 + if (!(val & (1 << (msg_obj_no - 1)))) {
277 can_get_echo_skb(dev,
278 msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST);
279 stats->tx_bytes += priv->read_reg(priv,
280 @@ -708,6 +708,8 @@ static void c_can_do_tx(struct net_device *dev)
281 & IF_MCONT_DLC_MASK;
282 stats->tx_packets++;
283 c_can_inval_msg_object(dev, 0, msg_obj_no);
284 + } else {
285 + break;
286 }
287 }
288
289 @@ -952,7 +954,7 @@ static int c_can_poll(struct napi_struct *napi, int quota)
290 struct net_device *dev = napi->dev;
291 struct c_can_priv *priv = netdev_priv(dev);
292
293 - irqstatus = priv->read_reg(priv, &priv->regs->interrupt);
294 + irqstatus = priv->irqstatus;
295 if (!irqstatus)
296 goto end;
297
298 @@ -1030,12 +1032,11 @@ end:
299
300 static irqreturn_t c_can_isr(int irq, void *dev_id)
301 {
302 - u16 irqstatus;
303 struct net_device *dev = (struct net_device *)dev_id;
304 struct c_can_priv *priv = netdev_priv(dev);
305
306 - irqstatus = priv->read_reg(priv, &priv->regs->interrupt);
307 - if (!irqstatus)
308 + priv->irqstatus = priv->read_reg(priv, &priv->regs->interrupt);
309 + if (!priv->irqstatus)
310 return IRQ_NONE;
311
312 /* disable all interrupts and schedule the NAPI */
313 @@ -1065,10 +1066,11 @@ static int c_can_open(struct net_device *dev)
314 goto exit_irq_fail;
315 }
316
317 + napi_enable(&priv->napi);
318 +
319 /* start the c_can controller */
320 c_can_start(dev);
321
322 - napi_enable(&priv->napi);
323 netif_start_queue(dev);
324
325 return 0;
326 diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h
327 index 9b7fbef..5f32d34 100644
328 --- a/drivers/net/can/c_can/c_can.h
329 +++ b/drivers/net/can/c_can/c_can.h
330 @@ -76,6 +76,7 @@ struct c_can_priv {
331 unsigned int tx_next;
332 unsigned int tx_echo;
333 void *priv; /* for board-specific data */
334 + u16 irqstatus;
335 };
336
337 struct net_device *alloc_c_can_dev(void);
338 diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
339 index 8676899..2c71884 100644
340 --- a/drivers/net/e1000/e1000.h
341 +++ b/drivers/net/e1000/e1000.h
342 @@ -150,6 +150,8 @@ struct e1000_buffer {
343 unsigned long time_stamp;
344 u16 length;
345 u16 next_to_watch;
346 + unsigned int segs;
347 + unsigned int bytecount;
348 u16 mapped_as_page;
349 };
350
351 diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
352 index 76e8af0..99525f9 100644
353 --- a/drivers/net/e1000/e1000_main.c
354 +++ b/drivers/net/e1000/e1000_main.c
355 @@ -2798,7 +2798,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
356 struct e1000_buffer *buffer_info;
357 unsigned int len = skb_headlen(skb);
358 unsigned int offset = 0, size, count = 0, i;
359 - unsigned int f;
360 + unsigned int f, bytecount, segs;
361
362 i = tx_ring->next_to_use;
363
364 @@ -2899,7 +2899,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
365 }
366 }
367
368 + segs = skb_shinfo(skb)->gso_segs ?: 1;
369 + /* multiply data chunks by size of headers */
370 + bytecount = ((segs - 1) * skb_headlen(skb)) + skb->len;
371 +
372 tx_ring->buffer_info[i].skb = skb;
373 + tx_ring->buffer_info[i].segs = segs;
374 + tx_ring->buffer_info[i].bytecount = bytecount;
375 tx_ring->buffer_info[first].next_to_watch = i;
376
377 return count;
378 @@ -3573,14 +3579,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,
379 cleaned = (i == eop);
380
381 if (cleaned) {
382 - struct sk_buff *skb = buffer_info->skb;
383 - unsigned int segs, bytecount;
384 - segs = skb_shinfo(skb)->gso_segs ?: 1;
385 - /* multiply data chunks by size of headers */
386 - bytecount = ((segs - 1) * skb_headlen(skb)) +
387 - skb->len;
388 - total_tx_packets += segs;
389 - total_tx_bytes += bytecount;
390 + total_tx_packets += buffer_info->segs;
391 + total_tx_bytes += buffer_info->bytecount;
392 }
393 e1000_unmap_and_free_tx_resource(adapter, buffer_info);
394 tx_desc->upper.data = 0;
395 diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
396 index ed1b432..864448b 100644
397 --- a/drivers/net/usb/sierra_net.c
398 +++ b/drivers/net/usb/sierra_net.c
399 @@ -943,7 +943,7 @@ struct sk_buff *sierra_net_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
400 }
401
402 static const u8 sierra_net_ifnum_list[] = { 7, 10, 11 };
403 -static const struct sierra_net_info_data sierra_net_info_data_68A3 = {
404 +static const struct sierra_net_info_data sierra_net_info_data_direct_ip = {
405 .rx_urb_size = 8 * 1024,
406 .whitelist = {
407 .infolen = ARRAY_SIZE(sierra_net_ifnum_list),
408 @@ -951,7 +951,7 @@ static const struct sierra_net_info_data sierra_net_info_data_68A3 = {
409 }
410 };
411
412 -static const struct driver_info sierra_net_info_68A3 = {
413 +static const struct driver_info sierra_net_info_direct_ip = {
414 .description = "Sierra Wireless USB-to-WWAN Modem",
415 .flags = FLAG_WWAN | FLAG_SEND_ZLP,
416 .bind = sierra_net_bind,
417 @@ -959,12 +959,18 @@ static const struct driver_info sierra_net_info_68A3 = {
418 .status = sierra_net_status,
419 .rx_fixup = sierra_net_rx_fixup,
420 .tx_fixup = sierra_net_tx_fixup,
421 - .data = (unsigned long)&sierra_net_info_data_68A3,
422 + .data = (unsigned long)&sierra_net_info_data_direct_ip,
423 };
424
425 static const struct usb_device_id products[] = {
426 {USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless USB-to-WWAN modem */
427 - .driver_info = (unsigned long) &sierra_net_info_68A3},
428 + .driver_info = (unsigned long) &sierra_net_info_direct_ip},
429 + {USB_DEVICE(0x0F3D, 0x68A3), /* AT&T Direct IP modem */
430 + .driver_info = (unsigned long) &sierra_net_info_direct_ip},
431 + {USB_DEVICE(0x1199, 0x68AA), /* Sierra Wireless Direct IP LTE modem */
432 + .driver_info = (unsigned long) &sierra_net_info_direct_ip},
433 + {USB_DEVICE(0x0F3D, 0x68AA), /* AT&T Direct IP LTE modem */
434 + .driver_info = (unsigned long) &sierra_net_info_direct_ip},
435
436 {}, /* last item */
437 };
438 diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
439 index 0bd722c..5c9999d 100644
440 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
441 +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
442 @@ -477,7 +477,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
443 sizeof(struct iwl_keyinfo));
444 priv->stations[sta_id].sta.key.key_flags =
445 STA_KEY_FLG_NO_ENC | STA_KEY_FLG_INVALID;
446 - priv->stations[sta_id].sta.key.key_offset = WEP_INVALID_OFFSET;
447 + priv->stations[sta_id].sta.key.key_offset = keyconf->hw_key_idx;
448 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
449 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
450
451 diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
452 index d5016071..c04a025 100644
453 --- a/fs/fuse/dir.c
454 +++ b/fs/fuse/dir.c
455 @@ -858,6 +858,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat,
456 if (stat) {
457 generic_fillattr(inode, stat);
458 stat->mode = fi->orig_i_mode;
459 + stat->ino = fi->orig_ino;
460 }
461 }
462
463 diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
464 index b788bec..f621550 100644
465 --- a/fs/fuse/fuse_i.h
466 +++ b/fs/fuse/fuse_i.h
467 @@ -82,6 +82,9 @@ struct fuse_inode {
468 preserve the original mode */
469 mode_t orig_i_mode;
470
471 + /** 64 bit inode number */
472 + u64 orig_ino;
473 +
474 /** Version of last attribute change */
475 u64 attr_version;
476
477 diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
478 index 38f84cd..69a1e0f 100644
479 --- a/fs/fuse/inode.c
480 +++ b/fs/fuse/inode.c
481 @@ -91,6 +91,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
482 fi->nlookup = 0;
483 fi->attr_version = 0;
484 fi->writectr = 0;
485 + fi->orig_ino = 0;
486 INIT_LIST_HEAD(&fi->write_files);
487 INIT_LIST_HEAD(&fi->queued_writes);
488 INIT_LIST_HEAD(&fi->writepages);
489 @@ -140,6 +141,18 @@ static int fuse_remount_fs(struct super_block *sb, int *flags, char *data)
490 return 0;
491 }
492
493 +/*
494 + * ino_t is 32-bits on 32-bit arch. We have to squash the 64-bit value down
495 + * so that it will fit.
496 + */
497 +static ino_t fuse_squash_ino(u64 ino64)
498 +{
499 + ino_t ino = (ino_t) ino64;
500 + if (sizeof(ino_t) < sizeof(u64))
501 + ino ^= ino64 >> (sizeof(u64) - sizeof(ino_t)) * 8;
502 + return ino;
503 +}
504 +
505 void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
506 u64 attr_valid)
507 {
508 @@ -149,7 +162,7 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
509 fi->attr_version = ++fc->attr_version;
510 fi->i_time = attr_valid;
511
512 - inode->i_ino = attr->ino;
513 + inode->i_ino = fuse_squash_ino(attr->ino);
514 inode->i_mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777);
515 inode->i_nlink = attr->nlink;
516 inode->i_uid = attr->uid;
517 @@ -175,6 +188,8 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr,
518 fi->orig_i_mode = inode->i_mode;
519 if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS))
520 inode->i_mode &= ~S_ISVTX;
521 +
522 + fi->orig_ino = attr->ino;
523 }
524
525 void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
526 diff --git a/kernel/sched.c b/kernel/sched.c
527 index 03dff14..8ef48f0 100644
528 --- a/kernel/sched.c
529 +++ b/kernel/sched.c
530 @@ -7220,11 +7220,8 @@ int sched_domain_level_max;
531
532 static int __init setup_relax_domain_level(char *str)
533 {
534 - unsigned long val;
535 -
536 - val = simple_strtoul(str, NULL, 0);
537 - if (val < sched_domain_level_max)
538 - default_relax_domain_level = val;
539 + if (kstrtoint(str, 0, &default_relax_domain_level))
540 + pr_warn("Unable to set relax_domain_level\n");
541
542 return 1;
543 }
544 @@ -7417,7 +7414,6 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
545 if (!sd)
546 return child;
547
548 - set_domain_attribute(sd, attr);
549 cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
550 if (child) {
551 sd->level = child->level + 1;
552 @@ -7425,6 +7421,7 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
553 child->parent = sd;
554 }
555 sd->child = child;
556 + set_domain_attribute(sd, attr);
557
558 return sd;
559 }
560 diff --git a/lib/btree.c b/lib/btree.c
561 index 2a34392..297124d 100644
562 --- a/lib/btree.c
563 +++ b/lib/btree.c
564 @@ -319,8 +319,8 @@ void *btree_get_prev(struct btree_head *head, struct btree_geo *geo,
565
566 if (head->height == 0)
567 return NULL;
568 -retry:
569 longcpy(key, __key, geo->keylen);
570 +retry:
571 dec_key(geo, key);
572
573 node = head->node;
574 @@ -351,7 +351,7 @@ retry:
575 }
576 miss:
577 if (retry_key) {
578 - __key = retry_key;
579 + longcpy(key, retry_key, geo->keylen);
580 retry_key = NULL;
581 goto retry;
582 }
583 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
584 index 00b0abb..05f8fd4 100644
585 --- a/mm/hugetlb.c
586 +++ b/mm/hugetlb.c
587 @@ -2060,6 +2060,15 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma)
588 kref_get(&reservations->refs);
589 }
590
591 +static void resv_map_put(struct vm_area_struct *vma)
592 +{
593 + struct resv_map *reservations = vma_resv_map(vma);
594 +
595 + if (!reservations)
596 + return;
597 + kref_put(&reservations->refs, resv_map_release);
598 +}
599 +
600 static void hugetlb_vm_op_close(struct vm_area_struct *vma)
601 {
602 struct hstate *h = hstate_vma(vma);
603 @@ -2075,7 +2084,7 @@ static void hugetlb_vm_op_close(struct vm_area_struct *vma)
604 reserve = (end - start) -
605 region_count(&reservations->regions, start, end);
606
607 - kref_put(&reservations->refs, resv_map_release);
608 + resv_map_put(vma);
609
610 if (reserve) {
611 hugetlb_acct_memory(h, -reserve);
612 @@ -2877,12 +2886,16 @@ int hugetlb_reserve_pages(struct inode *inode,
613 set_vma_resv_flags(vma, HPAGE_RESV_OWNER);
614 }
615
616 - if (chg < 0)
617 - return chg;
618 + if (chg < 0) {
619 + ret = chg;
620 + goto out_err;
621 + }
622
623 /* There must be enough filesystem quota for the mapping */
624 - if (hugetlb_get_quota(inode->i_mapping, chg))
625 - return -ENOSPC;
626 + if (hugetlb_get_quota(inode->i_mapping, chg)) {
627 + ret = -ENOSPC;
628 + goto out_err;
629 + }
630
631 /*
632 * Check enough hugepages are available for the reservation.
633 @@ -2891,7 +2904,7 @@ int hugetlb_reserve_pages(struct inode *inode,
634 ret = hugetlb_acct_memory(h, chg);
635 if (ret < 0) {
636 hugetlb_put_quota(inode->i_mapping, chg);
637 - return ret;
638 + goto out_err;
639 }
640
641 /*
642 @@ -2908,6 +2921,10 @@ int hugetlb_reserve_pages(struct inode *inode,
643 if (!vma || vma->vm_flags & VM_MAYSHARE)
644 region_add(&inode->i_mapping->private_list, from, to);
645 return 0;
646 +out_err:
647 + if (vma)
648 + resv_map_put(vma);
649 + return ret;
650 }
651
652 void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed)
653 diff --git a/mm/vmalloc.c b/mm/vmalloc.c
654 index 43b44db..bdb7004 100644
655 --- a/mm/vmalloc.c
656 +++ b/mm/vmalloc.c
657 @@ -256,7 +256,7 @@ struct vmap_area {
658 struct rb_node rb_node; /* address sorted rbtree */
659 struct list_head list; /* address sorted list */
660 struct list_head purge_list; /* "lazy purge" list */
661 - void *private;
662 + struct vm_struct *vm;
663 struct rcu_head rcu_head;
664 };
665
666 @@ -1174,9 +1174,10 @@ void __init vmalloc_init(void)
667 /* Import existing vmlist entries. */
668 for (tmp = vmlist; tmp; tmp = tmp->next) {
669 va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT);
670 - va->flags = tmp->flags | VM_VM_AREA;
671 + va->flags = VM_VM_AREA;
672 va->va_start = (unsigned long)tmp->addr;
673 va->va_end = va->va_start + tmp->size;
674 + va->vm = tmp;
675 __insert_vmap_area(va);
676 }
677
678 @@ -1274,7 +1275,7 @@ static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va,
679 vm->addr = (void *)va->va_start;
680 vm->size = va->va_end - va->va_start;
681 vm->caller = caller;
682 - va->private = vm;
683 + va->vm = vm;
684 va->flags |= VM_VM_AREA;
685 }
686
687 @@ -1397,7 +1398,7 @@ static struct vm_struct *find_vm_area(const void *addr)
688
689 va = find_vmap_area((unsigned long)addr);
690 if (va && va->flags & VM_VM_AREA)
691 - return va->private;
692 + return va->vm;
693
694 return NULL;
695 }
696 @@ -1416,7 +1417,7 @@ struct vm_struct *remove_vm_area(const void *addr)
697
698 va = find_vmap_area((unsigned long)addr);
699 if (va && va->flags & VM_VM_AREA) {
700 - struct vm_struct *vm = va->private;
701 + struct vm_struct *vm = va->vm;
702
703 if (!(vm->flags & VM_UNLIST)) {
704 struct vm_struct *tmp, **p;
705 diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
706 index 895eec1..65f3764c 100644
707 --- a/net/mac80211/iface.c
708 +++ b/net/mac80211/iface.c
709 @@ -498,6 +498,18 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
710 ieee80211_configure_filter(local);
711 break;
712 default:
713 + mutex_lock(&local->mtx);
714 + if (local->hw_roc_dev == sdata->dev &&
715 + local->hw_roc_channel) {
716 + /* ignore return value since this is racy */
717 + drv_cancel_remain_on_channel(local);
718 + ieee80211_queue_work(&local->hw, &local->hw_roc_done);
719 + }
720 + mutex_unlock(&local->mtx);
721 +
722 + flush_work(&local->hw_roc_start);
723 + flush_work(&local->hw_roc_done);
724 +
725 flush_work(&sdata->work);
726 /*
727 * When we get here, the interface is marked down.
728 diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
729 index 13427b1..c55eb9d 100644
730 --- a/net/mac80211/offchannel.c
731 +++ b/net/mac80211/offchannel.c
732 @@ -251,6 +251,22 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
733 return;
734 }
735
736 + /* was never transmitted */
737 + if (local->hw_roc_skb) {
738 + u64 cookie;
739 +
740 + cookie = local->hw_roc_cookie ^ 2;
741 +
742 + cfg80211_mgmt_tx_status(local->hw_roc_dev, cookie,
743 + local->hw_roc_skb->data,
744 + local->hw_roc_skb->len, false,
745 + GFP_KERNEL);
746 +
747 + kfree_skb(local->hw_roc_skb);
748 + local->hw_roc_skb = NULL;
749 + local->hw_roc_skb_for_status = NULL;
750 + }
751 +
752 if (!local->hw_roc_for_tx)
753 cfg80211_remain_on_channel_expired(local->hw_roc_dev,
754 local->hw_roc_cookie,
755 diff --git a/net/wireless/util.c b/net/wireless/util.c
756 index 9c22330..30f68dc 100644
757 --- a/net/wireless/util.c
758 +++ b/net/wireless/util.c
759 @@ -937,6 +937,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
760 enum nl80211_iftype iftype)
761 {
762 struct wireless_dev *wdev_iter;
763 + u32 used_iftypes = BIT(iftype);
764 int num[NUM_NL80211_IFTYPES];
765 int total = 1;
766 int i, j;
767 @@ -970,12 +971,14 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
768
769 num[wdev_iter->iftype]++;
770 total++;
771 + used_iftypes |= BIT(wdev_iter->iftype);
772 }
773 mutex_unlock(&rdev->devlist_mtx);
774
775 for (i = 0; i < rdev->wiphy.n_iface_combinations; i++) {
776 const struct ieee80211_iface_combination *c;
777 struct ieee80211_iface_limit *limits;
778 + u32 all_iftypes = 0;
779
780 c = &rdev->wiphy.iface_combinations[i];
781
782 @@ -990,6 +993,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
783 if (rdev->wiphy.software_iftypes & BIT(iftype))
784 continue;
785 for (j = 0; j < c->n_limits; j++) {
786 + all_iftypes |= limits[j].types;
787 if (!(limits[j].types & BIT(iftype)))
788 continue;
789 if (limits[j].max < num[iftype])
790 @@ -997,7 +1001,20 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
791 limits[j].max -= num[iftype];
792 }
793 }
794 - /* yay, it fits */
795 +
796 + /*
797 + * Finally check that all iftypes that we're currently
798 + * using are actually part of this combination. If they
799 + * aren't then we can't use this combination and have
800 + * to continue to the next.
801 + */
802 + if ((all_iftypes & used_iftypes) != used_iftypes)
803 + goto cont;
804 +
805 + /*
806 + * This combination covered all interface types and
807 + * supported the requested numbers, so we're good.
808 + */
809 kfree(limits);
810 return 0;
811 cont:

  ViewVC Help
Powered by ViewVC 1.1.20