Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r2722 - genpatches-2.6/trunk/3.4
Date: Mon, 31 Mar 2014 19:22:40
Message-Id: 20140331192234.532C32005C@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2014-03-31 19:22:34 +0000 (Mon, 31 Mar 2014)
3 New Revision: 2722
4
5 Added:
6 genpatches-2.6/trunk/3.4/1084_linux-3.4.85.patch
7 Modified:
8 genpatches-2.6/trunk/3.4/0000_README
9 Log:
10 Linux patch 3.4.85
11
12 Modified: genpatches-2.6/trunk/3.4/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/3.4/0000_README 2014-03-31 18:42:45 UTC (rev 2721)
15 +++ genpatches-2.6/trunk/3.4/0000_README 2014-03-31 19:22:34 UTC (rev 2722)
16 @@ -375,6 +375,10 @@
17 From: http://www.kernel.org
18 Desc: Linux 3.4.84
19
20 +Patch: 1084_linux-3.4.85.patch
21 +From: http://www.kernel.org
22 +Desc: Linux 3.4.85
23 +
24 Patch: 1500_XATTR_USER_PREFIX.patch
25 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
26 Desc: Support for namespace user.pax.* on tmpfs.
27
28 Added: genpatches-2.6/trunk/3.4/1084_linux-3.4.85.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/3.4/1084_linux-3.4.85.patch (rev 0)
31 +++ genpatches-2.6/trunk/3.4/1084_linux-3.4.85.patch 2014-03-31 19:22:34 UTC (rev 2722)
32 @@ -0,0 +1,403 @@
33 +diff --git a/Makefile b/Makefile
34 +index f75a853f8524..66ae2984a38c 100644
35 +--- a/Makefile
36 ++++ b/Makefile
37 +@@ -1,6 +1,6 @@
38 + VERSION = 3
39 + PATCHLEVEL = 4
40 +-SUBLEVEL = 84
41 ++SUBLEVEL = 85
42 + EXTRAVERSION =
43 + NAME = Saber-toothed Squirrel
44 +
45 +diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
46 +index 53426c66352a..2dd513bdca23 100644
47 +--- a/arch/arm/include/asm/outercache.h
48 ++++ b/arch/arm/include/asm/outercache.h
49 +@@ -37,10 +37,10 @@ struct outer_cache_fns {
50 + void (*resume)(void);
51 + };
52 +
53 +-#ifdef CONFIG_OUTER_CACHE
54 +-
55 + extern struct outer_cache_fns outer_cache;
56 +
57 ++#ifdef CONFIG_OUTER_CACHE
58 ++
59 + static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
60 + {
61 + if (outer_cache.inv_range)
62 +diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
63 +index 4cb164268846..fd6dec6ffa47 100644
64 +--- a/arch/x86/kvm/mmu.c
65 ++++ b/arch/x86/kvm/mmu.c
66 +@@ -2451,6 +2451,9 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
67 + int emulate = 0;
68 + gfn_t pseudo_gfn;
69 +
70 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
71 ++ return 0;
72 ++
73 + for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
74 + if (iterator.level == level) {
75 + unsigned pte_access = ACC_ALL;
76 +diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
77 +index 90f5c0ed9d2f..617b00b4857b 100644
78 +--- a/arch/x86/kvm/vmx.c
79 ++++ b/arch/x86/kvm/vmx.c
80 +@@ -6281,8 +6281,8 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
81 + struct vcpu_vmx *vmx = to_vmx(vcpu);
82 +
83 + free_vpid(vmx);
84 +- free_nested(vmx);
85 + free_loaded_vmcs(vmx->loaded_vmcs);
86 ++ free_nested(vmx);
87 + kfree(vmx->guest_msrs);
88 + kvm_vcpu_uninit(vcpu);
89 + kmem_cache_free(kvm_vcpu_cache, vmx);
90 +diff --git a/arch/x86/net/bpf_jit.S b/arch/x86/net/bpf_jit.S
91 +index 877b9a1b2152..01495755701b 100644
92 +--- a/arch/x86/net/bpf_jit.S
93 ++++ b/arch/x86/net/bpf_jit.S
94 +@@ -140,7 +140,7 @@ bpf_slow_path_byte_msh:
95 + push %r9; \
96 + push SKBDATA; \
97 + /* rsi already has offset */ \
98 +- mov $SIZE,%ecx; /* size */ \
99 ++ mov $SIZE,%edx; /* size */ \
100 + call bpf_internal_load_pointer_neg_helper; \
101 + test %rax,%rax; \
102 + pop SKBDATA; \
103 +diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
104 +index f4059e9da301..8ba22ebff637 100644
105 +--- a/drivers/edac/i7300_edac.c
106 ++++ b/drivers/edac/i7300_edac.c
107 +@@ -962,33 +962,35 @@ static int __devinit i7300_get_devices(struct mem_ctl_info *mci)
108 +
109 + /* Attempt to 'get' the MCH register we want */
110 + pdev = NULL;
111 +- while (!pvt->pci_dev_16_1_fsb_addr_map ||
112 +- !pvt->pci_dev_16_2_fsb_err_regs) {
113 +- pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
114 +- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, pdev);
115 +- if (!pdev) {
116 +- /* End of list, leave */
117 +- i7300_printk(KERN_ERR,
118 +- "'system address,Process Bus' "
119 +- "device not found:"
120 +- "vendor 0x%x device 0x%x ERR funcs "
121 +- "(broken BIOS?)\n",
122 +- PCI_VENDOR_ID_INTEL,
123 +- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
124 +- goto error;
125 +- }
126 +-
127 ++ while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
128 ++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR,
129 ++ pdev))) {
130 + /* Store device 16 funcs 1 and 2 */
131 + switch (PCI_FUNC(pdev->devfn)) {
132 + case 1:
133 +- pvt->pci_dev_16_1_fsb_addr_map = pdev;
134 ++ if (!pvt->pci_dev_16_1_fsb_addr_map)
135 ++ pvt->pci_dev_16_1_fsb_addr_map =
136 ++ pci_dev_get(pdev);
137 + break;
138 + case 2:
139 +- pvt->pci_dev_16_2_fsb_err_regs = pdev;
140 ++ if (!pvt->pci_dev_16_2_fsb_err_regs)
141 ++ pvt->pci_dev_16_2_fsb_err_regs =
142 ++ pci_dev_get(pdev);
143 + break;
144 + }
145 + }
146 +
147 ++ if (!pvt->pci_dev_16_1_fsb_addr_map ||
148 ++ !pvt->pci_dev_16_2_fsb_err_regs) {
149 ++ /* At least one device was not found */
150 ++ i7300_printk(KERN_ERR,
151 ++ "'system address,Process Bus' device not found:"
152 ++ "vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n",
153 ++ PCI_VENDOR_ID_INTEL,
154 ++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
155 ++ goto error;
156 ++ }
157 ++
158 + debugf1("System Address, processor bus- PCI Bus ID: %s %x:%x\n",
159 + pci_name(pvt->pci_dev_16_0_fsb_ctlr),
160 + pvt->pci_dev_16_0_fsb_ctlr->vendor,
161 +diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
162 +index 479011004a11..9bdc3b8597a4 100644
163 +--- a/drivers/input/mouse/elantech.c
164 ++++ b/drivers/input/mouse/elantech.c
165 +@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
166 + unsigned char *packet = psmouse->packet;
167 +
168 + input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
169 ++ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
170 + input_mt_report_pointer_emulation(dev, true);
171 + input_sync(dev);
172 + }
173 +@@ -954,6 +955,44 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse,
174 + }
175 +
176 + /*
177 ++ * Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
178 ++ * fw_version for this is based on the following fw_version & caps table:
179 ++ *
180 ++ * Laptop-model: fw_version: caps: buttons:
181 ++ * Acer S3 0x461f00 10, 13, 0e clickpad
182 ++ * Acer S7-392 0x581f01 50, 17, 0d clickpad
183 ++ * Acer V5-131 0x461f02 01, 16, 0c clickpad
184 ++ * Acer V5-551 0x461f00 ? clickpad
185 ++ * Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons
186 ++ * Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons
187 ++ * Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons
188 ++ * Asus UX31 0x361f00 20, 15, 0e clickpad
189 ++ * Asus UX32VD 0x361f02 00, 15, 0e clickpad
190 ++ * Avatar AVIU-145A2 0x361f00 ? clickpad
191 ++ * Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons
192 ++ * Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*)
193 ++ * Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons
194 ++ * Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad
195 ++ * Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad
196 ++ * Samsung NP900X3E-A02 0x575f03 ? clickpad
197 ++ * Samsung NP-QX410 0x851b00 19, 14, 0c clickpad
198 ++ * Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons
199 ++ * Samsung RF710 0x450f00 ? 2 hw buttons
200 ++ * System76 Pangolin 0x250f01 ? 2 hw buttons
201 ++ * (*) + 3 trackpoint buttons
202 ++ */
203 ++static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
204 ++{
205 ++ struct input_dev *dev = psmouse->dev;
206 ++ struct elantech_data *etd = psmouse->private;
207 ++
208 ++ if (etd->fw_version & 0x001000) {
209 ++ __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
210 ++ __clear_bit(BTN_RIGHT, dev->keybit);
211 ++ }
212 ++}
213 ++
214 ++/*
215 + * Set the appropriate event bits for the input subsystem
216 + */
217 + static int elantech_set_input_params(struct psmouse *psmouse)
218 +@@ -996,6 +1035,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
219 + __set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
220 + /* fall through */
221 + case 3:
222 ++ if (etd->hw_version == 3)
223 ++ elantech_set_buttonpad_prop(psmouse);
224 + input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
225 + input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
226 + if (etd->reports_pressure) {
227 +@@ -1017,9 +1058,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
228 + */
229 + psmouse_warn(psmouse, "couldn't query resolution data.\n");
230 + }
231 +- /* v4 is clickpad, with only one button. */
232 +- __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
233 +- __clear_bit(BTN_RIGHT, dev->keybit);
234 ++ elantech_set_buttonpad_prop(psmouse);
235 + __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
236 + /* For X to recognize me as touchpad. */
237 + input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
238 +diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
239 +index 91bad2f23842..ba38ace80a49 100644
240 +--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
241 ++++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
242 +@@ -825,14 +825,15 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
243 + trace_idx = 1;
244 + #endif
245 +
246 ++ /* map the remaining (adjusted) nocopy/dup fragments */
247 + for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
248 +- if (!cmd->len[i])
249 ++ if (!cmdlen[i])
250 + continue;
251 + if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
252 + continue;
253 + phys_addr = dma_map_single(trans->dev,
254 +- (void *)cmd->data[i],
255 +- cmd->len[i], DMA_BIDIRECTIONAL);
256 ++ (void *)cmddata[i],
257 ++ cmdlen[i], DMA_BIDIRECTIONAL);
258 + if (dma_mapping_error(trans->dev, phys_addr)) {
259 + iwlagn_unmap_tfd(trans, out_meta,
260 + &txq->tfds[q->write_ptr],
261 +diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
262 +index a08a6f0e4dd1..29338190ee27 100644
263 +--- a/drivers/net/wireless/p54/txrx.c
264 ++++ b/drivers/net/wireless/p54/txrx.c
265 +@@ -583,7 +583,7 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb)
266 + chan = priv->curchan;
267 + if (chan) {
268 + struct survey_info *survey = &priv->survey[chan->hw_value];
269 +- survey->noise = clamp_t(s8, priv->noise, -128, 127);
270 ++ survey->noise = clamp(priv->noise, -128, 127);
271 + survey->channel_time = priv->survey_raw.active;
272 + survey->channel_time_tx = priv->survey_raw.tx;
273 + survey->channel_time_busy = priv->survey_raw.tx +
274 +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
275 +index 8b1c27f93025..496764b60a3b 100644
276 +--- a/drivers/usb/host/xhci-pci.c
277 ++++ b/drivers/usb/host/xhci-pci.c
278 +@@ -109,6 +109,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
279 + xhci_dbg(xhci, "QUIRK: Resetting on resume\n");
280 + xhci->quirks |= XHCI_TRUST_TX_LENGTH;
281 + }
282 ++ if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
283 ++ pdev->device == 0x0015 &&
284 ++ pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
285 ++ pdev->subsystem_device == 0xc0cd)
286 ++ xhci->quirks |= XHCI_RESET_ON_RESUME;
287 + if (pdev->vendor == PCI_VENDOR_ID_VIA)
288 + xhci->quirks |= XHCI_RESET_ON_RESUME;
289 + }
290 +diff --git a/ipc/msg.c b/ipc/msg.c
291 +index 7385de25788a..25f1a6139584 100644
292 +--- a/ipc/msg.c
293 ++++ b/ipc/msg.c
294 +@@ -296,7 +296,9 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
295 + }
296 + atomic_sub(msq->q_cbytes, &ns->msg_bytes);
297 + security_msg_queue_free(msq);
298 ++ ipc_lock_by_ptr(&msq->q_perm);
299 + ipc_rcu_putref(msq);
300 ++ ipc_unlock(&msq->q_perm);
301 + }
302 +
303 + /*
304 +diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
305 +index d8f031a762ae..835d81b0934e 100644
306 +--- a/net/ceph/osd_client.c
307 ++++ b/net/ceph/osd_client.c
308 +@@ -1269,14 +1269,17 @@ static void reset_changed_osds(struct ceph_osd_client *osdc)
309 + *
310 + * Caller should hold map_sem for read.
311 + */
312 +-static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
313 ++static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
314 ++ bool force_resend_writes)
315 + {
316 + struct ceph_osd_request *req, *nreq;
317 + struct rb_node *p;
318 + int needmap = 0;
319 + int err;
320 ++ bool force_resend_req;
321 +
322 +- dout("kick_requests %s\n", force_resend ? " (force resend)" : "");
323 ++ dout("kick_requests %s %s\n", force_resend ? " (force resend)" : "",
324 ++ force_resend_writes ? " (force resend writes)" : "");
325 + mutex_lock(&osdc->request_mutex);
326 + for (p = rb_first(&osdc->requests); p; ) {
327 + req = rb_entry(p, struct ceph_osd_request, r_node);
328 +@@ -1299,7 +1302,10 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
329 + continue;
330 + }
331 +
332 +- err = __map_request(osdc, req, force_resend);
333 ++ force_resend_req = force_resend ||
334 ++ (force_resend_writes &&
335 ++ req->r_flags & CEPH_OSD_FLAG_WRITE);
336 ++ err = __map_request(osdc, req, force_resend_req);
337 + if (err < 0)
338 + continue; /* error */
339 + if (req->r_osd == NULL) {
340 +@@ -1319,7 +1325,8 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
341 + r_linger_item) {
342 + dout("linger req=%p req->r_osd=%p\n", req, req->r_osd);
343 +
344 +- err = __map_request(osdc, req, force_resend);
345 ++ err = __map_request(osdc, req,
346 ++ force_resend || force_resend_writes);
347 + dout("__map_request returned %d\n", err);
348 + if (err == 0)
349 + continue; /* no change and no osd was specified */
350 +@@ -1361,6 +1368,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
351 + struct ceph_osdmap *newmap = NULL, *oldmap;
352 + int err;
353 + struct ceph_fsid fsid;
354 ++ bool was_full;
355 +
356 + dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0);
357 + p = msg->front.iov_base;
358 +@@ -1374,6 +1382,8 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
359 +
360 + down_write(&osdc->map_sem);
361 +
362 ++ was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL);
363 ++
364 + /* incremental maps */
365 + ceph_decode_32_safe(&p, end, nr_maps, bad);
366 + dout(" %d inc maps\n", nr_maps);
367 +@@ -1398,7 +1408,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
368 + ceph_osdmap_destroy(osdc->osdmap);
369 + osdc->osdmap = newmap;
370 + }
371 +- kick_requests(osdc, 0);
372 ++ was_full = was_full ||
373 ++ ceph_osdmap_flag(osdc->osdmap,
374 ++ CEPH_OSDMAP_FULL);
375 ++ kick_requests(osdc, 0, was_full);
376 + } else {
377 + dout("ignoring incremental map %u len %d\n",
378 + epoch, maplen);
379 +@@ -1441,7 +1454,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
380 + skipped_map = 1;
381 + ceph_osdmap_destroy(oldmap);
382 + }
383 +- kick_requests(osdc, skipped_map);
384 ++ was_full = was_full ||
385 ++ ceph_osdmap_flag(osdc->osdmap,
386 ++ CEPH_OSDMAP_FULL);
387 ++ kick_requests(osdc, skipped_map, was_full);
388 + }
389 + p += maplen;
390 + nr_maps--;
391 +diff --git a/scripts/package/builddeb b/scripts/package/builddeb
392 +index eee5f8ed2493..ed7ccdcd3e6e 100644
393 +--- a/scripts/package/builddeb
394 ++++ b/scripts/package/builddeb
395 +@@ -62,7 +62,7 @@ create_package() {
396 + fi
397 +
398 + # Create the package
399 +- dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir"
400 ++ dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
401 + dpkg --build "$pdir" ..
402 + }
403 +
404 +@@ -252,15 +252,14 @@ mkdir -p "$destdir"
405 + (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
406 + ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
407 + rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
408 +-arch=$(dpkg --print-architecture)
409 +
410 + cat <<EOF >> debian/control
411 +
412 + Package: $kernel_headers_packagename
413 + Provides: linux-headers, linux-headers-2.6
414 +-Architecture: $arch
415 +-Description: Linux kernel headers for $KERNELRELEASE on $arch
416 +- This package provides kernel header files for $KERNELRELEASE on $arch
417 ++Architecture: any
418 ++Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
419 ++ This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
420 + .
421 + This is useful for people who need to build external modules
422 + EOF
423 +diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
424 +index 7895983862b2..1edb2e822074 100644
425 +--- a/sound/core/compress_offload.c
426 ++++ b/sound/core/compress_offload.c
427 +@@ -133,7 +133,7 @@ static int snd_compr_open(struct inode *inode, struct file *f)
428 + kfree(data);
429 + }
430 + snd_card_unref(compr->card);
431 +- return 0;
432 ++ return ret;
433 + }
434 +
435 + static int snd_compr_free(struct inode *inode, struct file *f)