3.13.8-stable review
Greg Kroah-Hartman
maintainercover 3.13.8-stable review
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.13.8-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.13.8-rc1
Ilya Dryomov <[email protected]>
libceph: fix preallocation check in get_reply()
Ilya Dryomov <[email protected]>
libceph: rename front to front_len in get_reply()
Ilya Dryomov <[email protected]>
libceph: rename ceph_msg::front_max to front_alloc_len
Michele Baldessari <[email protected]>
e100: Fix "disabling already-disabled device" warning
Sarah Sharp <[email protected]>
xhci: Fix resume issues on Renesas chips in Samsung laptops
Ping Cheng <[email protected]>
Input: wacom - add reporting of SW_MUTE_DEVICE events
Ping Cheng <[email protected]>
Input: wacom - add support for three new Intuos devices
Ping Cheng <[email protected]>
Input: wacom - make sure touch_max is set for touch devices
Marcelo Tosatti <[email protected]>
KVM: VMX: fix use after free of vmx->loaded_vmcs
Marcelo Tosatti <[email protected]>
KVM: x86: handle invalid root_hpa everywhere
Marcelo Tosatti <[email protected]>
KVM: MMU: handle invalid root_hpa at __direct_map
Hans de Goede <[email protected]>
Input: elantech - improve clickpad detection
Dave Jones <[email protected]>
fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists.
Gavin Shan <[email protected]>
powerpc/powernv: Refactor PHB diag-data dump
Gavin Shan <[email protected]>
powerpc/powernv: Dump PHB diag-data immediately
Gavin Shan <[email protected]>
powerpc/eeh: Handle multiple EEH errors
Gavin Shan <[email protected]>
powerpc/powernv: Move PHB-diag dump functions around
Markus Pargmann <[email protected]>
regulator: core: Replace direct ops->disable usage
Dan Carpenter <[email protected]>
p54: clamp properly instead of just truncating
Guenter Roeck <[email protected]>
MIPS: Fix build error seen in some configurations
Ben Hutchings <[email protected]>
deb-pkg: Fix cross-building linux-headers package
Ben Hutchings <[email protected]>
deb-pkg: Fix building for MIPS big-endian or ARM OABI
Peter Zijlstra <[email protected]>
perf tools: Fix AAAAARGH64 memory barriers
Russell King <[email protected]>
Fix uses of dma_max_pfn() when converting to a limiting address
Linus Torvalds <[email protected]>
printk: fix syslog() overflowing user buffer
Alexei Starovoitov <[email protected]>
x86: bpf_jit: support negative offsets
Trond Myklebust <[email protected]>
SUNRPC: Fix a pipe_version reference leak
Ben Peddell <[email protected]>
ARM: 7941/2: Fix incorrect FDT initrd parameter override
Ben Hutchings <[email protected]>
sfc: Use the correct maximum TX DMA ring size for SFC9100
Peter Zijlstra <[email protected]>
stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()
Stephen Warren <[email protected]>
ASoC: max98090: make REVISION_ID readable
Josh Durgin <[email protected]>
libceph: resend all writes after the osdmap loses the full flag
Josh Durgin <[email protected]>
libceph: block I/O when PAUSE or FULL osd map flags are set
Dan Carpenter <[email protected]>
media: cx18: check for allocation failure in cx18_read_eeprom()
Dan Carpenter <[email protected]>
media: dw2102: some missing unlocks on error
Dan Carpenter <[email protected]>
media: cxusb: unlock on error in cxusb_i2c_xfer()
Trond Myklebust <[email protected]>
NFSv4: Use the correct net namespace in nfs4_update_server
Christian Riesch <[email protected]>
net: davinci_emac: Replace devm_request_irq with request_irq
Helge Deller <[email protected]>
partly revert commit 8a10bc9: parisc/sti_console: prefer Linux fonts over built-in ROM fonts
Vaibhav Nagarnaik <[email protected]>
tracing: Fix array size mismatch in format string
Chris Wilson <[email protected]>
drm/i915: Disable stolen memory when DMAR is active
Daniel Vetter <[email protected]>
drm/i915: Don't enable display error interrupts from the start
Ben Widawsky <[email protected]>
drm/i915: Fix PSR programming
Stefan Agner <[email protected]>
clocksource: vf_pit_timer: use complement for sched_clock reading
Charles Keepax <[email protected]>
ALSA: compress: Pass through return value of open ops callback
Fernando Luis Vazquez Cao <[email protected]>
HID: hidraw: fix warning destroying hidraw device files after parent
-------------
Diffstat:
Makefile | 4 +- arch/arm/mm/init.c | 3 +- arch/mips/include/asm/syscall.h | 2 +- arch/powerpc/include/asm/eeh.h | 10 ++ arch/powerpc/kernel/eeh_driver.c | 150 ++++++++-------- arch/powerpc/platforms/powernv/eeh-ioda.c | 283 +++++++----------------------- arch/powerpc/platforms/powernv/pci.c | 226 ++++++++++++++++++------ arch/powerpc/platforms/powernv/pci.h | 3 + arch/x86/kvm/mmu.c | 12 ++ arch/x86/kvm/paging_tmpl.h | 8 + arch/x86/kvm/vmx.c | 2 +- arch/x86/net/bpf_jit.S | 2 +- drivers/clocksource/vf_pit_timer.c | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 7 + drivers/gpu/drm/i915/i915_irq.c | 18 +- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/hid/hidraw.c | 4 +- drivers/input/mouse/elantech.c | 45 ++++- drivers/input/tablet/wacom_sys.c | 23 ++- drivers/input/tablet/wacom_wac.c | 89 ++++++++-- drivers/input/tablet/wacom_wac.h | 7 + drivers/media/pci/cx18/cx18-driver.c | 5 +- drivers/media/usb/dvb-usb/cxusb.c | 21 ++- drivers/media/usb/dvb-usb/dw2102.c | 52 ++++-- drivers/mmc/card/queue.c | 2 +- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/sfc/efx.h | 3 + drivers/net/ethernet/sfc/ethtool.c | 4 +- drivers/net/ethernet/ti/davinci_emac.c | 25 ++- drivers/net/wireless/p54/txrx.c | 2 +- drivers/regulator/core.c | 34 ++-- drivers/scsi/scsi_lib.c | 2 +- drivers/usb/host/xhci-pci.c | 5 + fs/nfs/internal.h | 3 +- fs/nfs/nfs4client.c | 7 +- fs/nfs/nfs4namespace.c | 12 +- fs/proc/proc_devtree.c | 1 + include/linux/ceph/messenger.h | 2 +- include/linux/ceph/osd_client.h | 1 + include/linux/ftrace_event.h | 4 - include/trace/ftrace.h | 7 +- kernel/printk/printk.c | 2 - kernel/stop_machine.c | 2 +- kernel/trace/trace_events.c | 6 - kernel/trace/trace_export.c | 7 +- lib/fonts/Kconfig | 6 +- net/ceph/messenger.c | 7 +- net/ceph/mon_client.c | 8 +- net/ceph/osd_client.c | 66 +++++-- net/sunrpc/auth_gss/auth_gss.c | 4 +- scripts/package/builddeb | 13 +- sound/core/compress_offload.c | 2 +- sound/soc/codecs/max98090.c | 1 + tools/perf/perf.h | 4 +- 54 files changed, 713 insertions(+), 511 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/46 HID: hidraw: fix warning destroying hidraw device files after parent
3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Luis Vazquez Cao <[email protected]>
commit 47587fc098451c2100dc1fb618855fc2e2d937af upstream.
I noticed that after hot unplugging a Logitech unifying receiver (drivers/hid/hid-logitech-dj.c) the kernel would occasionally spew a stack trace similar to this:
usb 1-1.1.2: USB disconnect, device number 7
WARNING: CPU: 0 PID: 2865 at fs/sysfs/group.c:216 device_del+0x40/0x1b0() sysfs group ffffffff8187fa20 not found for kobject 'hidraw0' [...] CPU: 0 PID: 2865 Comm: upowerd Tainted: G W 3.14.0-rc4 #7 Hardware name: LENOVO 7783PN4/ , BIOS 9HKT43AUS 07/11/2011 0000000000000009 ffffffff814cd684 ffff880427ccfdf8 ffffffff810616e7 ffff88041ec61800 ffff880427ccfe48 ffff88041e444d80 ffff880426fab8e8 ffff880429359960 ffffffff8106174c ffffffff81714b98 0000000000000028 Call Trace: [<ffffffff814cd684>] ? dump_stack+0x41/0x51 [<ffffffff810616e7>] ? warn_slowpath_common+0x77/0x90 [<ffffffff8106174c>] ? warn_slowpath_fmt+0x4c/0x50 [<ffffffff81374fd0>] ? device_del+0x40/0x1b0 [<ffffffff8137516f>] ? device_unregister+0x2f/0x50 [<ffffffff813751fa>] ? device_destroy+0x3a/0x40 [<ffffffffa03ca245>] ? drop_ref+0x55/0x120 [hid] [<ffffffffa03ca3e6>] ? hidraw_release+0x96/0xb0 [hid] [<ffffffff811929da>] ? __fput+0xca/0x210 [<ffffffff8107fe17>] ? task_work_run+0x97/0xd0 [<ffffffff810139a9>] ? do_notify_resume+0x69/0xa0 [<ffffffff814dbd22>] ? int_signal+0x12/0x17 ---[ end trace 63f4a46f6566d737 ]---
During device removal hid_disconnect() is called via hid_hw_stop() to stop the device and free all its resources, including the sysfs files. The problem is that if a user space process, such as upowerd, holds a reference to a hidraw file the corresponding sysfs files will be kept around (drop_ref() does not call device_destroy() if the open counter is not 0) and it will be usb_disconnect() who, by calling device_del() for the USB device, will indirectly remove the sysfs files of the hidraw device (sysfs_remove_dir() is recursive these days). Because of this, by the time user space releases the last reference to the hidraw file and drop_ref() tries to destroy the device the sysfs files are already gone and the kernel will print the warning above.
Fix this by calling device_destroy() at USB disconnect time.
--- drivers/hid/hidraw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hidraw.c +2 -2
@@ -313,13 +313,13 @@ static void drop_ref(struct hidraw *hidrhid_hw_close (hidraw->hid);wake_up_interruptible (&hidraw->wait); } +device_destroy (hidraw_class, +MKDEV (hidraw_major, hidraw->minor)); }else { --hidraw->open; }if (!hidraw->open) {if (!hidraw->exist) { -device_destroy (hidraw_class, -MKDEV (hidraw_major, hidraw->minor)); hidraw_table[hidraw->minor] =NULL ;kfree (hidraw); }else {
Greg Kroah-Hartman
maintainerPATCH 2/46 ALSA: compress: Pass through return value of open ops callback
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <[email protected]>
commit 749d32237bf39e6576dd95bfdf24e4378e51716c upstream.
The snd_compr_open function would always return 0 even if the compressed ops open function failed, obviously this is incorrect. Looks like this was introduced by a small typo in:
commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85
ALSA: Add a reference counter to card instance
This patch returns the value from the compressed op as it should.
--- sound/core/compress_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/compress_offload.c +1 -1
@@ -133,7 +133,7 @@ static int snd_compr_open(struct inode *kfree (data); }snd_card_unref (compr->card); -return 0 ; +return ret; }static int snd_compr_free (struct inode *inode,struct file *f)
Greg Kroah-Hartman
maintainerPATCH 3/46 clocksource: vf_pit_timer: use complement for sched_clock reading
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Agner <[email protected]>
commit 224aa3ed45c8735ae02bb2ecca002409fa6aa772 upstream.
Vybrids PIT register is monitonic decreasing. However, sched_clock reading needs to be monitonic increasing. Use bitwise not to get the complement of the clock register. This fixes the clock going backward. Also, the clock now starts at 0 since we load the register with the maximum value at start.
--- drivers/clocksource/vf_pit_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/vf_pit_timer.c +1 -1
@@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(vstatic u64 pit_read_sched_clock (void ) { -return __raw_readl (clksrc_base +PITCVAL ); +return ~__raw_readl (clksrc_base +PITCVAL ); }static int __init pit_clocksource_init (unsigned long rate)
Greg Kroah-Hartman
maintainerPATCH 4/46 drm/i915: Fix PSR programming
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Widawsky <[email protected]>
commit 24bd9bf54d45d28089251cdf62bf14323d1aa827 upstream.
| has a higher precedence than ?. Therefore, the calculation doesn't do at all what you would expect. Thanks to Ken for convincing me that this was indeed the issue. Send me back to C programmer school, please.
I'm sort of surprised PSR was continuing to work for people. It should be broken IMO (and it was broken for me, but I had assumed it never worked).
Regression from:
commit ed8546ac1f99b850879f07b1e9b06b42fb0a36d9
Author: Ben Widawsky <[email protected]> Date: Mon Nov 4 22:45:05 2013 -0800
drm/i915/bdw: Support eDP PSR
--- drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -1634,7 +1634,7 @@ static void intel_edp_psr_enable_source( val |=EDP_PSR_LINK_DISABLE ;I915_WRITE (EDP_PSR_CTL (dev), val | -IS_BROADWELL (dev) ?0 : link_entry_time | + (IS_BROADWELL (dev) ?0 : link_entry_time) | max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT | idle_frames <<EDP_PSR_IDLE_FRAME_SHIFT |EDP_PSR_ENABLE );
Greg Kroah-Hartman
maintainerPATCH 5/46 drm/i915: Dont enable display error interrupts from the start
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Vetter <[email protected]>
commit 5c673b60a9b3b23486f4eda75c72e91d31d26a2b upstream.
We need to enable interrupt processing before all the modeset state is set up. But that means we can fall over when we get a pipe underrun. This shouldn't happen as long as the bios works correctly but as usual this turns out to be wishful thinking.
So disable error interrupts at irq install time and rely on the re-enabling code in the modeset functions to take care of this.
Note that due to the SDE interrupt handling race we must uncondtionally enable all interrupt sources in SDEIER, hence no need to enable the SERR bit specifically.
On gmch platforms we don't have an explicit enable/mask bit for fifo underruns. Fixing this up would require a bit of software tracking, hence is material for a separate patch. To make this possible we need to switch all gmch platforms to the new pipestat interrupt handling scheme Imre implemented for vlv, and then also add a safe form of sw state checking to __cpu_fifo_underrun_reporting_enabled a bit.
v2: Also handle the ilk/snb cpu fifo underrun bits accordingly. Spotted by Ville.
v3: Also handle the south interrupt underrun bits on ibx. Again spotted by Ville.
--- drivers/gpu/drm/i915/i915_irq.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +8 -10
@@ -2760,10 +2760,9 @@ static void ibx_irq_postinstall(struct dreturn ;if (HAS_PCH_IBX (dev)) { - mask =SDE_GMBUS |SDE_AUX_MASK |SDE_TRANSB_FIFO_UNDER | -SDE_TRANSA_FIFO_UNDER |SDE_POISON ; + mask =SDE_GMBUS |SDE_AUX_MASK |SDE_POISON ; }else { - mask =SDE_GMBUS_CPT |SDE_AUX_MASK_CPT |SDE_ERROR_CPT ; + mask =SDE_GMBUS_CPT |SDE_AUX_MASK_CPT ;I915_WRITE (SERR_INT ,I915_READ (SERR_INT )); }
@@ -2823,20 +2822,19 @@ static int ironlake_irq_postinstall(stru display_mask = (DE_MASTER_IRQ_CONTROL |DE_GSE_IVB |DE_PCH_EVENT_IVB |DE_PLANEC_FLIP_DONE_IVB |DE_PLANEB_FLIP_DONE_IVB | -DE_PLANEA_FLIP_DONE_IVB |DE_AUX_CHANNEL_A_IVB | -DE_ERR_INT_IVB ); +DE_PLANEA_FLIP_DONE_IVB |DE_AUX_CHANNEL_A_IVB ); extra_mask = (DE_PIPEC_VBLANK_IVB |DE_PIPEB_VBLANK_IVB | -DE_PIPEA_VBLANK_IVB ); +DE_PIPEA_VBLANK_IVB |DE_ERR_INT_IVB );I915_WRITE (GEN7_ERR_INT ,I915_READ (GEN7_ERR_INT )); }else { display_mask = (DE_MASTER_IRQ_CONTROL |DE_GSE |DE_PCH_EVENT |DE_PLANEA_FLIP_DONE |DE_PLANEB_FLIP_DONE |DE_AUX_CHANNEL_A | -DE_PIPEB_FIFO_UNDERRUN |DE_PIPEA_FIFO_UNDERRUN |DE_PIPEB_CRC_DONE |DE_PIPEA_CRC_DONE |DE_POISON ); - extra_mask =DE_PIPEA_VBLANK |DE_PIPEB_VBLANK |DE_PCU_EVENT ; + extra_mask =DE_PIPEA_VBLANK |DE_PIPEB_VBLANK |DE_PCU_EVENT | +DE_PIPEB_FIFO_UNDERRUN |DE_PIPEA_FIFO_UNDERRUN ; } dev_priv->irq_mask = ~display_mask;
@@ -2952,9 +2950,9 @@ static void gen8_de_irq_postinstall(strustruct drm_device *dev = dev_priv->dev;uint32_t de_pipe_masked =GEN8_PIPE_FLIP_DONE |GEN8_PIPE_CDCLK_CRC_DONE | -GEN8_PIPE_FIFO_UNDERRUN |GEN8_DE_PIPE_IRQ_FAULT_ERRORS ; -uint32_t de_pipe_enables = de_pipe_masked |GEN8_PIPE_VBLANK ; +uint32_t de_pipe_enables = de_pipe_masked |GEN8_PIPE_VBLANK | +GEN8_PIPE_FIFO_UNDERRUN ;int pipe; dev_priv->de_irq_mask[PIPE_A ] = ~de_pipe_masked; dev_priv->de_irq_mask[PIPE_B ] = ~de_pipe_masked;
Greg Kroah-Hartman
maintainerPATCH 6/46 drm/i915: Disable stolen memory when DMAR is active
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit 0f4706d2740f2a221cd502922b22e522009041d9 upstream.
We have reports of heavy screen corruption if we try to use the stolen memory reserved by the BIOS whilst the DMA-Remapper is active. This quirk may be only specific to a few machines or BIOSes, but first lets apply the big hammer and always disable use of stolen memory when DMAR is active.
v2 by Jani: Rebase on -fixes, only look at intel_iommu_gfx_mapped.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68535
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_gem_stolen.c +7 -0
@@ -201,6 +201,13 @@ int i915_gem_init_stolen(struct drm_devistruct drm_i915_private *dev_priv = dev->dev_private;int bios_reserved =0 ; +#ifdef CONFIG_INTEL_IOMMU +if (intel_iommu_gfx_mapped) { +DRM_INFO ("DMAR active, disabling use of stolen memory\n" ); +return 0 ; + } +#endif +if (dev_priv->gtt.stolen_size ==0 )return 0 ;
Greg Kroah-Hartman
maintainerPATCH 7/46 tracing: Fix array size mismatch in format string
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vaibhav Nagarnaik <[email protected]>
commit 87291347c49dc40aa339f587b209618201c2e527 upstream.
In event format strings, the array size is reported in two locations. One in array subscript and then via the "size:" attribute. The values reported there have a mismatch.
For e.g., in sched:sched_switch the prev_comm and next_comm character arrays have subscript values as [32] where as the actual field size is 16.
name: sched_switch
ID: 301
format:
field:unsigned short common_type; offset:0; size:2; signed:0;
field:unsigned char common_flags; offset:2; size:1; signed:0;
field:unsigned char common_preempt_count; offset:3; size:1;signed:0;
field:int common_pid; offset:4; size:4; signed:1;
field:char prev_comm[32]; offset:8; size:16; signed:1;
field:pid_t prev_pid; offset:24; size:4; signed:1;
field:int prev_prio; offset:28; size:4; signed:1;
field:long prev_state; offset:32; size:8; signed:1;
field:char next_comm[32]; offset:40; size:16; signed:1;
field:pid_t next_pid; offset:56; size:4; signed:1;
field:int next_prio; offset:60; size:4; signed:1;After bisection, the following commit was blamed:
92edca0 tracing: Use direct field, type and system names
This commit removes the duplication of strings for field->name and field->type assuming that all the strings passed in __trace_define_field() are immutable. This is not true for arrays, where the type string is created in event_storage variable and field->type for all array fields points to event_storage.
Use __stringify() to create a string constant for the type string.
Also, get rid of event_storage and event_storage_mutex that are not needed anymore.
also, an added benefit is that this reduces the overhead of events a bit more:
text data bss dec hex filename
8424787 2036472 1302528 11763787 b3804b vmlinux
8420814 2036408 1302528 11759750 b37086 vmlinux.patched
--- include/linux/ftrace_event.h | 4 ---- include/trace/ftrace.h | 7 ++----- kernel/trace/trace_events.c | 6 ------ kernel/trace/trace_export.c | 7 ++----- 4 files changed, 4 insertions(+), 20 deletions(-)
include/linux/ftrace_event.h +0 -4
@@ -356,10 +356,6 @@ enum { FILTER_TRACE_FN, }; -#define EVENT_STORAGE_SIZE 128 -extern struct mutex event_storage_mutex; -extern char event_storage[EVENT_STORAGE_SIZE ]; -extern int trace_event_raw_init (struct ftrace_event_call *call); extern int trace_define_field(struct ftrace_event_call *call, const char *type, const char *name, int offset, int size,
include/trace/ftrace.h +2 -5
@@ -310,15 +310,12 @@ static struct trace_event_functions ftra#undef __array#define __array (type, item, len) \ do { \ - mutex_lock(&event_storage_mutex); \ + char *type_str = #type"["__stringify(len)"]"; \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ - snprintf(event_storage, sizeof(event_storage), \ - "%s[%d]", #type, len); \ - ret = trace_define_field(event_call, event_storage, #item, \ + ret = trace_define_field(event_call, type_str, #item, \ offsetof(typeof(field), item), \ sizeof(field.item), \ is_signed_type(type), FILTER_OTHER); \ - mutex_unlock(&event_storage_mutex); \ if (ret) \ return ret; \ } while (0);
kernel/trace/trace_events.c +0 -6
@@ -27,12 +27,6 @@DEFINE_MUTEX (event_mutex); -DEFINE_MUTEX (event_storage_mutex); -EXPORT_SYMBOL_GPL (event_storage_mutex); - -char event_storage[EVENT_STORAGE_SIZE ]; -EXPORT_SYMBOL_GPL (event_storage); -LIST_HEAD (ftrace_events);static LIST_HEAD (ftrace_common_fields);
kernel/trace/trace_export.c +2 -5
@@ -95,15 +95,12 @@ static void __always_unused ____ftrace_c#undef __array#define __array (type, item, len) \ do { \ + char *type_str = #type"["__stringify(len)"]"; \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ - mutex_lock(&event_storage_mutex); \ - snprintf(event_storage, sizeof(event_storage), \ - "%s[%d]", #type, len); \ - ret = trace_define_field(event_call, event_storage, #item, \ + ret = trace_define_field(event_call, type_str, #item, \ offsetof(typeof(field), item), \ sizeof(field.item), \ is_signed_type(type), filter_type); \ - mutex_unlock(&event_storage_mutex); \ if (ret) \ return ret; \ } while (0);
Greg Kroah-Hartman
maintainerPATCH 8/46 partly revert commit 8a10bc9: parisc/sti_console: prefer Linux fonts over built-in ROM fonts
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
commit a2fb4d782c61f77480e586578eeb4dfd27d134ea upstream.
STI console is used on parisc and m68k HP machines. This patch partly reverts my previous commit and as such restores the fonts for the m68k machines.
--- lib/fonts/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/fonts/Kconfig +3 -3
@@ -9,7 +9,7 @@ if FONT_SUPPORT config FONTS bool "Select compiled-in fonts" - depends on FRAMEBUFFER_CONSOLE + depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE help Say Y here if you would like to use fonts other than the default your frame buffer console usually use.
@@ -22,7 +22,7 @@ config FONTS config FONT_8x8 bool "VGA 8x8 font" if FONTS - depends on FRAMEBUFFER_CONSOLE + depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE default y if !SPARC && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one
@@ -45,7 +45,7 @@ config FONT_8x16 config FONT_6x11 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS - depends on FRAMEBUFFER_CONSOLE + depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE default y if !SPARC && !FONTS && MAC help Small console font with Macintosh-style high-half glyphs. Some Mac
Greg Kroah-Hartman
maintainerPATCH 9/46 net: davinci_emac: Replace devm_request_irq with request_irq
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Riesch <[email protected]>
commit 33b7107f59a61236d94ecd6b45e20283cd5abcc8 upstream.
In commit 6892b41d9701283085b655c6086fb57a5d63fa47
Author: Lad, Prabhakar <[email protected]>
Date: Tue Jun 25 21:24:51 2013 +0530
net: davinci: emac: Convert to devm_* api
the call of request_irq is replaced by devm_request_irq and the call of free_irq is removed. But since interrupts are requested in emac_dev_open, doing ifconfig up/down on the board requests the interrupts again each time, causing devm_request_irq to fail. The interface is dead until the device is rebooted.
This patch reverts said commit partially: It changes the driver back to use request_irq instead of devm_request_irq, puts free_irq back in place, but keeps the remaining changes of the original patch.
--- drivers/net/ethernet/ti/davinci_emac.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-)
drivers/net/ethernet/ti/davinci_emac.c +21 -4
@@ -1532,7 +1532,7 @@ static int emac_dev_open(struct net_devistruct device *emac_dev = &ndev->dev;u32 cnt;struct resource *res; -int ret; +int q, m, ret;int i =0 ;int k =0 ;struct emac_priv *priv =netdev_priv (ndev);
@@ -1567,8 +1567,7 @@ static int emac_dev_open(struct net_deviwhile ((res =platform_get_resource (priv->pdev,IORESOURCE_IRQ , k))) {for (i = res->start; i <= res->end; i++) { -if (devm_request_irq (&priv->pdev->dev, i, emac_irq, -0 , ndev->name, ndev)) +if (request_irq (i, emac_irq,0 , ndev->name, ndev)) goto rollback; } k++;
@@ -1641,7 +1640,15 @@ static int emac_dev_open(struct net_devi rollback: -dev_err (emac_dev,"DaVinci EMAC: devm_request_irq() failed" ); +dev_err (emac_dev,"DaVinci EMAC: request_irq() failed" ); + +for (q = k; k >=0 ; k--) { +for (m = i; m >= res->start; m--) +free_irq (m, ndev); + res =platform_get_resource (priv->pdev,IORESOURCE_IRQ , k-1 ); + m = res->end; + } + ret = -EBUSY ; err:pm_runtime_put (&priv->pdev->dev);
@@ -1659,6 +1666,9 @@ err:*/ static int emac_dev_stop (struct net_device *ndev) { +struct resource *res; +int i =0 ; +int irq_num;struct emac_priv *priv =netdev_priv (ndev);struct device *emac_dev = &ndev->dev;
@@ -1674,6 +1684,13 @@ static int emac_dev_stop(struct net_deviif (priv->phydev)phy_disconnect (priv->phydev); +/* Free IRQ */ +while ((res =platform_get_resource (priv->pdev,IORESOURCE_IRQ , i))) { +for (irq_num = res->start; irq_num <= res->end; irq_num++) +free_irq (irq_num, priv->ndev); + i++; + } +if (netif_msg_drv (priv))dev_notice (emac_dev,"DaVinci EMAC: %s stopped\n" , ndev->name);
Greg Kroah-Hartman
maintainerPATCH 10/46 NFSv4: Use the correct net namespace in nfs4_update_server
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
commit 292f503cade2b1d966239ef56a851e6897d1ba92 upstream.
We need to use the same net namespace that was used to resolve the hostname and sockaddr arguments.
--- fs/nfs/internal.h | 3 ++- fs/nfs/nfs4client.c | 7 ++++--- fs/nfs/nfs4namespace.c | 12 ++++++------ 3 files changed, 12 insertions(+), 10 deletions(-)
fs/nfs/internal.h +2 -1
@@ -176,7 +176,8 @@ extern struct nfs_server *nfs4_create_seextern struct nfs_server *nfs4_create_referral_server (struct nfs_clone_mount *,struct nfs_fh *);extern int nfs4_update_server (struct nfs_server *server,const char *hostname, -struct sockaddr *sap,size_t salen); +struct sockaddr *sap,size_t salen, +struct net *net);extern void nfs_free_server (struct nfs_server *server); extern struct nfs_server *nfs_clone_server(struct nfs_server *, struct nfs_fh *,
fs/nfs/nfs4client.c +4 -3
@@ -1133,6 +1133,7 @@ static int nfs_probe_destination(struct* @hostname: new end-point's hostname * @sap: new end-point's socket address * @salen: size of "sap" +* @net: net namespace * * The nfs_server must be quiescent before this function is invoked. * Either its session is drained (NFSv4.1+), or its transport is
@@ -1141,13 +1142,13 @@ static int nfs_probe_destination(struct* Returns zero on success, or a negative errno value. */ int nfs4_update_server (struct nfs_server *server,const char *hostname, -struct sockaddr *sap,size_t salen) +struct sockaddr *sap,size_t salen,struct net *net) {struct nfs_client *clp = server->nfs_client;struct rpc_clnt *clnt = server->client;struct xprt_create xargs = { .ident = clp->cl_proto, - .net = &init_net, + .net = net, .dstaddr = sap, .addrlen = salen, .servername = hostname,
@@ -1187,7 +1188,7 @@ int nfs4_update_server(struct nfs_server error =nfs4_set_client (server, hostname, sap, salen, buf, clp->cl_rpcclient->cl_auth->au_flavor, clp->cl_proto, clnt->cl_timeout, - clp->cl_minorversion, clp->cl_net); + clp->cl_minorversion, net);nfs_put_client (clp);if (error !=0 ) {nfs_server_insert_lists (server);
fs/nfs/nfs4namespace.c +6 -6
@@ -121,9 +121,8 @@ static int nfs4_validate_fspath(struct d }static size_t nfs_parse_server_name (char *string,size_t len, -struct sockaddr *sa,size_t salen,struct nfs_server *server) +struct sockaddr *sa,size_t salen,struct net *net) { -struct net *net =rpc_net_ns (server->client);ssize_t ret; ret =rpc_pton (net, string, len, sa, salen);
@@ -223,6 +222,7 @@ static struct vfsmount *try_location(str const struct nfs4_fs_location *location) {const size_t addr_bufsize =sizeof (struct sockaddr_storage ); +struct net *net =rpc_net_ns (NFS_SB (mountdata->sb)->client);struct vfsmount *mnt =ERR_PTR (-ENOENT );char *mnt_path;unsigned int maxbuflen;
@@ -248,8 +248,7 @@ static struct vfsmount *try_location(strcontinue ; mountdata->addrlen =nfs_parse_server_name (buf->data, buf->len, - mountdata->addr, addr_bufsize, -NFS_SB (mountdata->sb)); + mountdata->addr, addr_bufsize, net);if (mountdata->addrlen ==0 )continue ;
@@ -419,6 +418,7 @@ static int nfs4_try_replacing_one_locati const struct nfs4_fs_location *location) {const size_t addr_bufsize =sizeof (struct sockaddr_storage ); +struct net *net =rpc_net_ns (server->client);struct sockaddr *sap;unsigned int s;size_t salen;
@@ -440,7 +440,7 @@ static int nfs4_try_replacing_one_locaticontinue ; salen =nfs_parse_server_name (buf->data, buf->len, - sap, addr_bufsize, server); + sap, addr_bufsize, net);if (salen ==0 )continue ;rpc_set_port (sap,NFS_PORT );
@@ -450,7 +450,7 @@ static int nfs4_try_replacing_one_locatiif (hostname ==NULL )break ; - error =nfs4_update_server (server, hostname, sap, salen); + error =nfs4_update_server (server, hostname, sap, salen, net);kfree (hostname);if (error ==0 )break ;
Greg Kroah-Hartman
maintainerPATCH 11/46 media: cxusb: unlock on error in cxusb_i2c_xfer()
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 1cdbcc5db4e6d51ce9bb1313195167cada9aa6e9 upstream.
We recently introduced some new error paths which are missing their unlocks.
--- drivers/media/usb/dvb-usb/cxusb.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/media/usb/dvb-usb/cxusb.c +16 -5
@@ -149,6 +149,7 @@ static int cxusb_i2c_xfer(struct i2c_ada int num) {struct dvb_usb_device *d =i2c_get_adapdata (adap); +int ret;int i;if (mutex_lock_interruptible (&d->i2c_mutex) <0 )
@@ -173,7 +174,8 @@ static int cxusb_i2c_xfer(struct i2c_adaif (1 + msg[i].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[i].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] =0 ; obuf[1 ] = msg[i].len;
@@ -193,12 +195,14 @@ static int cxusb_i2c_xfer(struct i2c_adaif (3 + msg[i].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[i].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; }if (1 + msg[i +1 ].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[i +1 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[i].len; obuf[1 ] = msg[i+1 ].len;
@@ -223,7 +227,8 @@ static int cxusb_i2c_xfer(struct i2c_adaif (2 + msg[i].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[i].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[i].addr; obuf[1 ] = msg[i].len;
@@ -237,8 +242,14 @@ static int cxusb_i2c_xfer(struct i2c_ada } } +if (i == num) + ret = num; +else + ret = -EREMOTEIO ; + +unlock:mutex_unlock (&d->i2c_mutex); -return i == num ? num : -EREMOTEIO ; +return ret; }static u32 cxusb_i2c_func (struct i2c_adapter *adapter)
Greg Kroah-Hartman
maintainerPATCH 12/46 media: dw2102: some missing unlocks on error
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 324ed533bf0b23c309b805272c4ffcc5d51493a6 upstream.
We recently introduced some new error paths but the unlocks are missing.
--- drivers/media/usb/dvb-usb/dw2102.c | 52 +++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 16 deletions(-)
drivers/media/usb/dvb-usb/dw2102.c +36 -16
@@ -301,6 +301,7 @@ static int dw2102_serit_i2c_transfer(strstatic int dw2102_earda_i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) {struct dvb_usb_device *d =i2c_get_adapdata (adap); +int ret;if (!d)return -ENODEV ;
@@ -316,7 +317,8 @@ static int dw2102_earda_i2c_transfer(strif (2 + msg[1 ].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[1 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[0 ].addr <<1 ;
@@ -340,7 +342,8 @@ static int dw2102_earda_i2c_transfer(strif (2 + msg[0 ].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[1 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[0 ].addr <<1 ;
@@ -357,7 +360,8 @@ static int dw2102_earda_i2c_transfer(strif (2 + msg[0 ].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[1 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[0 ].addr <<1 ;
@@ -386,15 +390,17 @@ static int dw2102_earda_i2c_transfer(strbreak ; } + ret = num; +unlock:mutex_unlock (&d->i2c_mutex); -return num; +return ret; }static int dw2104_i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) {struct dvb_usb_device *d =i2c_get_adapdata (adap); -int len, i, j; +int len, i, j, ret;if (!d)return -ENODEV ;
@@ -430,7 +436,8 @@ static int dw2104_i2c_transfer(struct i2if (2 + msg[j].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[j].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } dw210x_op_rw(d->udev, 0xc3,
@@ -466,7 +473,8 @@ static int dw2104_i2c_transfer(struct i2if (2 + msg[j].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[j].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[j].addr <<1 ;
@@ -481,15 +489,18 @@ static int dw2104_i2c_transfer(struct i2 } } + ret = num; +unlock:mutex_unlock (&d->i2c_mutex); -return num; +return ret; }static int dw3101_i2c_transfer (struct i2c_adapter *adap,struct i2c_msg msg[],int num) {struct dvb_usb_device *d =i2c_get_adapdata (adap); +int ret;int i;if (!d)
@@ -506,7 +517,8 @@ static int dw3101_i2c_transfer(struct i2if (2 + msg[1 ].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[1 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[0 ].addr <<1 ; obuf[1 ] = msg[0 ].len;
@@ -530,7 +542,8 @@ static int dw3101_i2c_transfer(struct i2if (2 + msg[0 ].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[0 ].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[0 ].addr <<1 ; obuf[1 ] = msg[0 ].len;
@@ -556,9 +569,11 @@ static int dw3101_i2c_transfer(struct i2 msg[i].flags == 0 ? ">>>" : "<<<");debug_dump (msg[i].buf, msg[i].len, deb_xfer); } + ret = num; +unlock:mutex_unlock (&d->i2c_mutex); -return num; +return ret; } static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
@@ -566,7 +581,7 @@ static int s6x0_i2c_transfer(struct i2c_ {struct dvb_usb_device *d =i2c_get_adapdata (adap);struct usb_device *udev; -int len, i, j; +int len, i, j, ret;if (!d)return -ENODEV ;
@@ -618,7 +633,8 @@ static int s6x0_i2c_transfer(struct i2c_if (msg[j].len >sizeof (ibuf)) {warn ("i2c rd: len=%d is too big!\n" , msg[j].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } dw210x_op_rw(d->udev, 0x91, 0, 0,
@@ -652,7 +668,8 @@ static int s6x0_i2c_transfer(struct i2c_if (2 + msg[j].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[j].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[j +1 ].len;
@@ -671,7 +688,8 @@ static int s6x0_i2c_transfer(struct i2c_if (2 + msg[j].len >sizeof (obuf)) {warn ("i2c wr: len=%d is too big!\n" , msg[j].len); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto unlock; } obuf[0 ] = msg[j].len +1 ; obuf[1 ] = (msg[j].addr <<1 );
@@ -685,9 +703,11 @@ static int s6x0_i2c_transfer(struct i2c_ } } } + ret = num; +unlock:mutex_unlock (&d->i2c_mutex); -return num; +return ret; } static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
Greg Kroah-Hartman
maintainerPATCH 13/46 media: cx18: check for allocation failure in cx18_read_eeprom()
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit e351bf25fa373a3de0be2141b962c5c3c27006a2 upstream.
It upsets static checkers when we don't check for allocation failure. I moved the memset() of "tv" earlier so we don't use uninitialized data on error.
--- drivers/media/pci/cx18/cx18-driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/media/pci/cx18/cx18-driver.c +4 -1
@@ -327,13 +327,16 @@ void cx18_read_eeprom(struct cx18 *cx, sstruct i2c_client *c;u8 eedata[256 ]; +memset (tv,0 ,sizeof (*tv)); + c =kzalloc (sizeof (*c),GFP_KERNEL ); +if (!c) +return ;strlcpy (c->name,"cx18 tveeprom tmp" ,sizeof (c->name)); c->adapter = &cx->i2c_adap[0 ]; c->addr =0xa0 >>1 ; -memset (tv,0 ,sizeof (*tv));if (tveeprom_read (c, eedata,sizeof (eedata))) goto ret;
Greg Kroah-Hartman
maintainerPATCH 14/46 libceph: block I/O when PAUSE or FULL osd map flags are set
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Durgin <[email protected]>
commit d29adb34a94715174c88ca93e8aba955850c9bde upstream.
The PAUSEWR and PAUSERD flags are meant to stop the cluster from processing writes and reads, respectively. The FULL flag is set when the cluster determines that it is out of space, and will no longer process writes. PAUSEWR and PAUSERD are purely client-side settings already implemented in userspace clients. The osd does nothing special with these flags.
When the FULL flag is set, however, the osd responds to all writes with -ENOSPC. For cephfs, this makes sense, but for rbd the block layer translates this into EIO. If a cluster goes from full to non-full quickly, a filesystem on top of rbd will not behave well, since some writes succeed while others get EIO.
Fix this by blocking any writes when the FULL flag is set in the osd client. This is the same strategy used by userspace, so apply it by default. A follow-on patch makes this configurable.
__map_request() is called to re-target osd requests in case the available osds changed. Add a paused field to a ceph_osd_request, and set it whenever an appropriate osd map flag is set. Avoid queueing paused requests in __map_request(), but force them to be resent if they become unpaused.
Also subscribe to the next osd map from the monitor if any of these flags are set, so paused requests can be unblocked as soon as possible.
--- include/linux/ceph/osd_client.h | 1 + net/ceph/osd_client.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-)
include/linux/ceph/osd_client.h +1 -0
@@ -138,6 +138,7 @@ struct ceph_osd_request {__le64 *r_request_pool;void *r_request_pgid;__le32 *r_request_attempts; +bool r_paused;struct ceph_eversion *r_request_reassert_version;int r_result;
net/ceph/osd_client.c +27 -2
@@ -1232,6 +1232,22 @@ void ceph_osdc_set_request_linger(structEXPORT_SYMBOL (ceph_osdc_set_request_linger);/* +* Returns whether a request should be blocked from being sent +* based on the current osdmap and osd_client settings. +* +* Caller should hold map_sem for read. +*/ +static bool __req_should_be_paused (struct ceph_osd_client *osdc, +struct ceph_osd_request *req) +{ +bool pauserd =ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_PAUSERD ); +bool pausewr =ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_PAUSEWR ) || +ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_FULL ); +return (req->r_flags &CEPH_OSD_FLAG_READ && pauserd) || + (req->r_flags &CEPH_OSD_FLAG_WRITE && pausewr); +} + +/* * Pick an osd (the first 'up' osd in the pg), allocate the osd struct * (as needed), and set the request r_osd appropriately. If there is * no up osd, set r_osd to NULL. Move the request to the appropriate list
@@ -1248,6 +1264,7 @@ static int __map_request(struct ceph_osdint acting[CEPH_PG_MAX_SIZE ];int o =-1 , num =0 ;int err; +bool was_paused;dout ("map_request %p tid %lld\n" , req, req->r_tid); err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap,
@@ -1264,12 +1281,18 @@ static int __map_request(struct ceph_osd num = err; } + was_paused = req->r_paused; + req->r_paused =__req_should_be_paused (osdc, req); +if (was_paused && !req->r_paused) + force_resend =1 ; +if ((!force_resend && req->r_osd && req->r_osd->o_osd == o && req->r_sent >= req->r_osd->o_incarnation && req->r_num_pg_osds == num &&memcmp (req->r_pg_osds, acting,sizeof (acting[0 ])*num) ==0 ) || - (req->r_osd ==NULL && o ==-1 )) + (req->r_osd ==NULL && o ==-1 ) || + req->r_paused)return 0 ;/* no change */ dout("map_request tid %llu pgid %lld.%x osd%d (was osd%d)\n",
@@ -1804,7 +1827,9 @@ done:* we find out when we are no longer full and stop returning * ENOSPC. */ -if (ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_FULL )) +if (ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_FULL ) || +ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_PAUSERD ) || +ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_PAUSEWR ))ceph_monc_request_next_osdmap (&osdc->client->monc);mutex_lock (&osdc->request_mutex);
Greg Kroah-Hartman
maintainerPATCH 15/46 libceph: resend all writes after the osdmap loses the full flag
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Durgin <[email protected]>
commit 9a1ea2dbff11547a8e664f143c1ffefc586a577a upstream.
With the current full handling, there is a race between osds and clients getting the first map marked full. If the osd wins, it will return -ENOSPC to any writes, but the client may already have writes in flight. This results in the client getting the error and propagating it up the stack. For rbd, the block layer turns this into EIO, which can cause corruption in filesystems above it.
To avoid this race, osds are being changed to drop writes that came from clients with an osdmap older than the last osdmap marked full. In order for this to work, clients must resend all writes after they encounter a full -> not full transition in the osdmap. osds will wait for an updated map instead of processing a request from a client with a newer map, so resent writes will not be dropped by the osd unless there is another not full -> full transition.
This approach requires both osds and clients to be fixed to avoid the race. Old clients talking to osds with this fix may hang instead of returning EIO and potentially corrupting an fs. New clients talking to old osds have the same behavior as before if they encounter this race.
--- net/ceph/osd_client.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
net/ceph/osd_client.c +22 -6
@@ -1636,14 +1636,17 @@ static void reset_changed_osds(struct ce* * Caller should hold map_sem for read. */ -static void kick_requests (struct ceph_osd_client *osdc,int force_resend) +static void kick_requests (struct ceph_osd_client *osdc,bool force_resend, +bool force_resend_writes) {struct ceph_osd_request *req, *nreq;struct rb_node *p;int needmap =0 ;int err; +bool force_resend_req; -dout ("kick_requests %s\n" , force_resend ?" (force resend)" :"" ); +dout ("kick_requests %s %s\n" , force_resend ?" (force resend)" :"" , + force_resend_writes ?" (force resend writes)" :"" );mutex_lock (&osdc->request_mutex);for (p =rb_first (&osdc->requests); p; ) { req = rb_entry(p, struct ceph_osd_request, r_node);
@@ -1668,7 +1671,10 @@ static void kick_requests(struct ceph_oscontinue ; } - err =__map_request (osdc, req, force_resend); + force_resend_req = force_resend || + (force_resend_writes && + req->r_flags &CEPH_OSD_FLAG_WRITE ); + err =__map_request (osdc, req, force_resend_req);if (err <0 )continue ;/* error */ if (req->r_osd ==NULL ) {
@@ -1688,7 +1694,8 @@ static void kick_requests(struct ceph_os r_linger_item) {dout ("linger req=%p req->r_osd=%p\n" , req, req->r_osd); - err =__map_request (osdc, req, force_resend); + err =__map_request (osdc, req, + force_resend || force_resend_writes);dout ("__map_request returned %d\n" , err);if (err ==0 )continue ;/* no change and no osd was specified */
@@ -1730,6 +1737,7 @@ void ceph_osdc_handle_map(struct ceph_osstruct ceph_osdmap *newmap =NULL , *oldmap;int err;struct ceph_fsid fsid; +bool was_full;dout ("handle_map have %u\n" , osdc->osdmap ? osdc->osdmap->epoch :0 ); p = msg->front.iov_base;
@@ -1743,6 +1751,8 @@ void ceph_osdc_handle_map(struct ceph_osdown_write (&osdc->map_sem); + was_full =ceph_osdmap_flag (osdc->osdmap,CEPH_OSDMAP_FULL ); +/* incremental maps */ ceph_decode_32_safe (&p, end, nr_maps, bad);dout (" %d inc maps\n" , nr_maps);
@@ -1767,7 +1777,10 @@ void ceph_osdc_handle_map(struct ceph_osceph_osdmap_destroy (osdc->osdmap); osdc->osdmap = newmap; } -kick_requests (osdc,0 ); + was_full = was_full || +ceph_osdmap_flag (osdc->osdmap, +CEPH_OSDMAP_FULL ); +kick_requests (osdc,0 , was_full); }else {dout ("ignoring incremental map %u len %d\n" , epoch, maplen);
@@ -1810,7 +1823,10 @@ void ceph_osdc_handle_map(struct ceph_os skipped_map =1 ;ceph_osdmap_destroy (oldmap); } -kick_requests (osdc, skipped_map); + was_full = was_full || +ceph_osdmap_flag (osdc->osdmap, +CEPH_OSDMAP_FULL ); +kick_requests (osdc, skipped_map, was_full); } p += maplen; nr_maps--;
Greg Kroah-Hartman
maintainerPATCH 16/46 ASoC: max98090: make REVISION_ID readable
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Warren <[email protected]>
commit e126a646f77fdd66978785cb0a3a5e46b07aee2e upstream.
The REVISION_ID register is not currently marked readable. snd_soc_read() refuses to read the register, and hence probe() fails.
--- sound/soc/codecs/max98090.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/max98090.c +1 -0
@@ -336,6 +336,7 @@ static bool max98090_readable_register(scase M98090_REG_RECORD_TDM_SLOT :case M98090_REG_SAMPLE_RATE : case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E: +case M98090_REG_REVISION_ID :return true;default :return false;
Greg Kroah-Hartman
maintainerPATCH 17/46 stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
commit 177c53d943368fc97644ebc0a250dc8e2d124250 upstream.
We must use smp_call_function_single(.wait=1) for the irq_cpu_stop_queue_work() to ensure the queueing is actually done under stop_cpus_lock. Without this we could have dropped the lock by the time we do the queueing and get the race we tried to fix.
--- kernel/stop_machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/stop_machine.c +1 -1
@@ -293,7 +293,7 @@ int stop_two_cpus(unsigned int cpu1, uns*/ smp_call_function_single (min (cpu1, cpu2), &irq_cpu_stop_queue_work, - &call_args,0 ); + &call_args,1 );lg_local_unlock (&stop_cpus_lock);preempt_enable ();
Greg Kroah-Hartman
maintainerPATCH 18/46 sfc: Use the correct maximum TX DMA ring size for SFC9100
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
commit d9317aea16ecec7694271ef11fb7791a0f0d9cc5 upstream.
As part of a workaround for a hardware erratum in the SFC9100 family (SF bug 35388), the TX_DESC_UPD_DWORD register address is also used for communicating with the event block, and only descriptor pointer values < 2048 are valid.
If the TX DMA ring size is increased to 4096 descriptors (which the firmware still allows) then we may write a descriptor pointer value >= 2048, which has entirely different and undesirable effects!
Limit the TX DMA ring size correctly when this workaround is in effect.
--- drivers/net/ethernet/sfc/efx.h | 3 +++ drivers/net/ethernet/sfc/ethtool.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/sfc/efx.h +3 -0
@@ -66,6 +66,9 @@ void efx_schedule_slow_fill(struct efx_r#define EFX_RXQ_MIN_ENT 128U#define EFX_TXQ_MIN_ENT (efx) (2 * efx_tx_max_skb_descs(efx)) +#define EFX_TXQ_MAX_ENT (efx) (EFX_WORKAROUND_35388(efx) ? \ + EFX_MAX_DMAQ_SIZE / 2 : EFX_MAX_DMAQ_SIZE) +/* Filters */ /**
drivers/net/ethernet/sfc/ethtool.c +2 -2
@@ -583,7 +583,7 @@ static void efx_ethtool_get_ringparam(ststruct efx_nic *efx =netdev_priv (net_dev); ring->rx_max_pending =EFX_MAX_DMAQ_SIZE ; - ring->tx_max_pending =EFX_MAX_DMAQ_SIZE ; + ring->tx_max_pending =EFX_TXQ_MAX_ENT (efx); ring->rx_pending = efx->rxq_entries; ring->tx_pending = efx->txq_entries; }
@@ -596,7 +596,7 @@ static int efx_ethtool_set_ringparam(strif (ring->rx_mini_pending || ring->rx_jumbo_pending || ring->rx_pending >EFX_MAX_DMAQ_SIZE || - ring->tx_pending >EFX_MAX_DMAQ_SIZE ) + ring->tx_pending >EFX_TXQ_MAX_ENT (efx))return -EINVAL ;if (ring->rx_pending <EFX_RXQ_MIN_ENT ) {
Greg Kroah-Hartman
maintainerPATCH 19/46 ARM: 7941/2: Fix incorrect FDT initrd parameter override
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Peddell <[email protected]>
commit 4c235cb9e35407bdb4a2debeef4dc8721e8f91f2 upstream.
Commit 65939301acdb (arm: set initrd_start/initrd_end for fdt scan) caused the FDT initrd_start and initrd_end to override the phys_initrd_start and phys_initrd_size set by the initrd= kernel parameter. With this patch initrd_start and initrd_end will be overridden if phys_initrd_start and phys_initrd_size are set by the kernel initrd= parameter.
--- arch/arm/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mm/init.c +2 -1
@@ -345,10 +345,11 @@ void __init arm_memblock_init(struct mem#endif #ifdef CONFIG_BLK_DEV_INITRD /* FDT scan will populate initrd_start */ -if (initrd_start) { +if (initrd_start && !phys_initrd_size) { phys_initrd_start =__virt_to_phys (initrd_start); phys_initrd_size = initrd_end - initrd_start; } + initrd_start = initrd_end =0 ;if (phys_initrd_size && !memblock_is_region_memory (phys_initrd_start, phys_initrd_size)) { pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
Greg Kroah-Hartman
maintainerPATCH 20/46 SUNRPC: Fix a pipe_version reference leak
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
commit e9776d0f4adee8877145672f6416b06b57f2dc27 upstream.
In gss_alloc_msg(), if the call to gss_encode_v1_msg() fails, we want to release the reference to the pipe_version that was obtained earlier in the function.
--- net/sunrpc/auth_gss/auth_gss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/sunrpc/auth_gss/auth_gss.c +3 -1
@@ -500,10 +500,12 @@ gss_alloc_msg(struct gss_auth *gss_auth,default : err =gss_encode_v1_msg (gss_msg, service_name, gss_auth->target_name);if (err) - goto err_free_msg; + goto err_put_pipe_version; };kref_get (&gss_auth->kref);return gss_msg; +err_put_pipe_version: +put_pipe_version (gss_auth->net); err_free_msg:kfree (gss_msg); err:
Greg Kroah-Hartman
maintainerPATCH 21/46 x86: bpf_jit: support negative offsets
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexei Starovoitov <[email protected]>
commit fdfaf64e75397567257e1051931f9a3377360665 upstream.
Commit a998d4342337 claimed to introduce negative offset support to x86 jit, but it couldn't be working, since at the time of the execution of LD+ABS or LD+IND instructions via call into bpf_internal_load_pointer_neg_helper() the %edx (3rd argument of this func) had junk value instead of access size in bytes (1 or 2 or 4).
Store size into %edx instead of %ecx (what original commit intended to do)
--- arch/x86/net/bpf_jit.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/net/bpf_jit.S +1 -1
@@ -140,7 +140,7 @@ bpf_slow_path_byte_msh: push %r9; \ push SKBDATA; \ /* rsi already has offset */ \ - mov $SIZE,%ecx; /* size */ \ + mov $SIZE,%edx; /* size */ \ call bpf_internal_load_pointer_neg_helper; \ test %rax,%rax; \ pop SKBDATA; \
Greg Kroah-Hartman
maintainerPATCH 22/46 printk: fix syslog() overflowing user buffer
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit e4178d809fdaee32a56833fff1f5056c99e90a1a upstream.
This is not a buffer overflow in the traditional sense: we don't overflow any *kernel* buffers, but we do mis-count the amount of data we copy back to user space for the SYSLOG_ACTION_READ_ALL case.
In particular, if the user buffer is too small to hold everything, and *if* there is a continuation line at just the right place, we can end up giving the user more data than he asked for.
The reason is that we first count up the number of bytes all the log records contains, then we walk the records again until we've skipped the records at the beginning that won't fit, and then we walk the rest of the records and copy them to the user space buffer.
And in between that "skip the initial records that won't fit" and the "copy the records that *will* fit to user space", we reset the 'prev' variable that contained the record information for the last record not copied. That meant that when we started copying to user space, we now had a different character count than what we had originally calculated in the first record walk-through.
The fix is to simply not clear the 'prev' flags value (in both cases where we had the same logic: syslog_print_all and kmsg_dump_get_buffer:
the latter is used for pstore-like dumping)
--- kernel/printk/printk.c | 2 -- 1 file changed, 2 deletions(-)
kernel/printk/printk.c +0 -2
@@ -1080,7 +1080,6 @@ static int syslog_print_all(char __user next_seq = log_next_seq; len =0 ; - prev =0 ;while (len >=0 && seq < next_seq) {struct printk_log *msg =log_from_idx (idx);int textlen;
@@ -2789,7 +2788,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du next_idx = idx; l =0 ; - prev =0 ;while (seq < dumper->next_seq) {struct printk_log *msg =log_from_idx (idx);
Greg Kroah-Hartman
maintainerPATCH 23/46 Fix uses of dma_max_pfn() when converting to a limiting address
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Russell King <[email protected]>
commit e83b366487b5582274374f8226e489cb214ae5a6 upstream.
We must use a 64-bit for this, otherwise overflowed bits get lost, and that can result in a lower than intended value set.
--- drivers/mmc/card/queue.c | 2 +- drivers/scsi/scsi_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/card/queue.c +1 -1
@@ -197,7 +197,7 @@ int mmc_init_queue(struct mmc_queue *mq,struct mmc_queue_req *mqrq_prev = &mq->mqrq[1 ];if (mmc_dev (host)->dma_mask && *mmc_dev (host)->dma_mask) - limit =dma_max_pfn (mmc_dev (host)) <<PAGE_SHIFT ; + limit = (u64 )dma_max_pfn (mmc_dev (host)) <<PAGE_SHIFT ; mq->card = card; mq->queue =blk_init_queue (mmc_request_fn, lock);
drivers/scsi/scsi_lib.c +1 -1
@@ -1684,7 +1684,7 @@ u64 scsi_calculate_bounce_limit(struct S host_dev =scsi_get_device (shost);if (host_dev && host_dev->dma_mask) - bounce_limit =dma_max_pfn (host_dev) <<PAGE_SHIFT ; + bounce_limit = (u64 )dma_max_pfn (host_dev) <<PAGE_SHIFT ;return bounce_limit; }
Greg Kroah-Hartman
maintainerPATCH 24/46 perf tools: Fix AAAAARGH64 memory barriers
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
commit f428ebd184c82a7914b2aa7e9f868918aaf7ea78 upstream.
Someone got the load and store barriers mixed up for AAAAARGH64. Turn them the right side up.
--- tools/perf/perf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/perf.h +2 -2
@@ -100,8 +100,8 @@#ifdef __aarch64__#define mb () asm volatile("dmb ish" ::: "memory") -#define wmb () asm volatile("dmb ishld" ::: "memory") -#define rmb () asm volatile("dmb ishst" ::: "memory") +#define wmb () asm volatile("dmb ishst" ::: "memory") +#define rmb () asm volatile("dmb ishld" ::: "memory")#define cpu_relax () asm volatile("yield" ::: "memory")#endif
Greg Kroah-Hartman
maintainerPATCH 25/46 deb-pkg: Fix building for MIPS big-endian or ARM OABI
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
commit c5e318f67eebbad491615a752c51dbfde7dc3d78 upstream.
These commands will mysteriously fail:
$ make ARCH=arm versatile_defconfig [...] $ make ARCH=arm deb-pkg [...] make[1]: *** [deb-pkg] Error 1 make: *** [deb-pkg] Error 2
The Debian architecture selection for these kernel architectures does 'grep FOO=y $KCONFIG_CONFIG && echo bar', and after 'set -e' this aborts the script if grep does not find the given config symbol.
--- scripts/package/builddeb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/package/builddeb +2 -2
@@ -41,9 +41,9 @@ create_package() { parisc*) debarch=hppa ;; mips*) - debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;; + debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; arm*) - debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;; + debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;; *) echo "" >&2 echo "** ** ** WARNING ** ** **" >&2
Greg Kroah-Hartman
maintainerPATCH 26/46 deb-pkg: Fix cross-building linux-headers package
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream.
builddeb generates a control file that says the linux-headers package can only be built for the build system primary architecture. This breaks cross-building configurations. We should use $debarch for this instead.
Since $debarch is not yet set when generating the control file, set
Architecture: any and use control file variables to fill in the description.
--- scripts/package/builddeb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
scripts/package/builddeb +4 -5
@@ -62,7 +62,7 @@ create_package() { fi # Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" dpkg --build "$pdir" .. }
@@ -288,15 +288,14 @@ mkdir -p "$destdir" (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" -arch=$(dpkg --print-architecture) cat <<EOF >> debian/control Package: $kernel_headers_packagename Provides: linux-headers, linux-headers-2.6 -Architecture: $arch -Description: Linux kernel headers for $KERNELRELEASE on $arch - This package provides kernel header files for $KERNELRELEASE on $arch +Architecture: any +Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} + This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} . This is useful for people who need to build external modules EOF
Greg Kroah-Hartman
maintainerPATCH 27/46 MIPS: Fix build error seen in some configurations
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
commit 63238f2cc5518e1c45a3418fc0ac0f560dafe7ef upstream.
The following build error is seen if CONFIG_32BIT is undefined, CONFIG_64BIT is defined, and CONFIG_MIPS32_O32 is undefined.
asm/syscall.h: In function 'mips_get_syscall_arg':arch/mips/include/asm/syscall.h:32:16: error: unused variable 'usp' [-Werror=unused-variable]
cc1: all warnings being treated as errors
Patchwork: http://patchwork.linux-mips.org/patch/6160/
--- arch/mips/include/asm/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/syscall.h +1 -1
@@ -29,7 +29,7 @@ static inline long syscall_get_nr(structstatic inline unsigned long mips_get_syscall_arg (unsigned long *arg,struct task_struct *task,struct pt_regs *regs,unsigned int n) { -unsigned long usp = regs->regs[29 ]; +unsigned long usp__maybe_unused = regs->regs[29 ];switch (n) {case 0 :case 1 :case 2 :case 3 :
Greg Kroah-Hartman
maintainerPATCH 28/46 p54: clamp properly instead of just truncating
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 608cfbe4abaf76e9d732efd7ed1cfa3998163d91 upstream.
The call to clamp_t() first truncates the variable signed 8 bit and as a result, the actual clamp is a no-op.
--- drivers/net/wireless/p54/txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/p54/txrx.c +1 -1
@@ -587,7 +587,7 @@ static void p54_rx_stats(struct p54_comm chan = priv->curchan;if (chan) {struct survey_info *survey = &priv->survey[chan->hw_value]; - survey->noise =clamp_t (s8, priv->noise,-128 ,127 ); + survey->noise =clamp (priv->noise,-128 ,127 ); survey->channel_time = priv->survey_raw.active; survey->channel_time_tx = priv->survey_raw.tx; survey->channel_time_busy = priv->survey_raw.tx +
Greg Kroah-Hartman
maintainerPATCH 29/46 regulator: core: Replace direct ops->disable usage
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Pargmann <[email protected]>
commit 66fda75f47dc583f1c187556e9a2c082dd64f8c6 upstream.
There are many places where ops->disable is called directly. Instead we should use _regulator_do_disable() which also handles gpio regulators.
To be able to use the wrapper function from _regulator_force_disable(), I moved the _notifier_call_chain() call from _regulator_do_disable() to _regulator_disable(). This way, _regulator_force_disable() can use different flags for _notifier_call_chain() without calling it twice.
--- drivers/regulator/core.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-)
drivers/regulator/core.c +13 -21
@@ -1908,8 +1908,6 @@ static int _regulator_do_disable(structtrace_regulator_disable_complete (rdev_get_name (rdev)); -_notifier_call_chain (rdev,REGULATOR_EVENT_DISABLE , -NULL );return 0 ; }
@@ -1933,6 +1931,8 @@ static int _regulator_disable(struct regrdev_err (rdev,"failed to disable\n" );return ret; } +_notifier_call_chain (rdev,REGULATOR_EVENT_DISABLE , +NULL ); } rdev->use_count =0 ;
@@ -1985,20 +1985,16 @@ static int _regulator_force_disable(stru {int ret =0 ; -/* force disable */ -if (rdev->desc->ops->disable) { -/* ah well, who wants to live forever... */ - ret = rdev->desc->ops->disable (rdev); -if (ret <0 ) { -rdev_err (rdev,"failed to force disable\n" ); -return ret; - } -/* notify other consumers that power has been forced off */ -_notifier_call_chain (rdev,REGULATOR_EVENT_FORCE_DISABLE | -REGULATOR_EVENT_DISABLE ,NULL ); + ret =_regulator_do_disable (rdev); +if (ret <0 ) { +rdev_err (rdev,"failed to force disable\n" ); +return ret; } -return ret; +_notifier_call_chain (rdev,REGULATOR_EVENT_FORCE_DISABLE | +REGULATOR_EVENT_DISABLE ,NULL ); + +return 0 ; }/**
@@ -3631,8 +3627,6 @@ int regulator_suspend_finish(void)mutex_lock (®ulator_list_mutex);list_for_each_entry (rdev, ®ulator_list, list) { -struct regulator_ops *ops = rdev->desc->ops; -mutex_lock (&rdev->mutex);if (rdev->use_count >0 || rdev->constraints->always_on) { error =_regulator_do_enable (rdev);
@@ -3641,12 +3635,10 @@ int regulator_suspend_finish(void) }else {if (!have_full_constraints ()) goto unlock; -if (!ops->disable) - goto unlock;if (!_regulator_is_enabled (rdev)) goto unlock; - error = ops->disable (rdev); + error =_regulator_do_disable (rdev);if (error) ret = error; }
@@ -3820,7 +3812,7 @@ static int __init regulator_init_complet ops = rdev->desc->ops; c = rdev->constraints; -if (!ops->disable || (c && c->always_on)) +if (c && c->always_on)continue ;mutex_lock (&rdev->mutex);
@@ -3841,7 +3833,7 @@ static int __init regulator_init_complet/* We log since this may kill the system if it * goes wrong. */ rdev_info (rdev,"disabling\n" ); - ret = ops->disable (rdev); + ret =_regulator_do_disable (rdev);if (ret !=0 ) {rdev_err (rdev,"couldn't disable: %d\n" , ret); }
Greg Kroah-Hartman
maintainerPATCH 30/46 powerpc/powernv: Move PHB-diag dump functions around
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <[email protected]>
commit 93aef2a789778e7ec787179fc9b34ca4885a5ef3 upstream.
Prior to the completion of PCI enumeration, we actively detects EEH errors on PCI config cycles and dump PHB diag-data if necessary. The EEH backend also dumps PHB diag-data in case of frozen PE or fenced PHB. However, we are using different functions to dump the PHB diag-data for those 2 cases.
The patch merges the functions for dumping PHB diag-data to one so that we can avoid duplicate code. Also, we never dump PHB3 diag-data during PCI config cycles with frozen PE. The patch fixes it as well.
--- arch/powerpc/platforms/powernv/eeh-ioda.c | 147 ---------------------- arch/powerpc/platforms/powernv/pci.c | 194 +++++++++++++++++++++--------- arch/powerpc/platforms/powernv/pci.h | 3 3 files changed, 141 insertions(+), 203 deletions(-)
arch/powerpc/platforms/powernv/eeh-ioda.c +1 -146
@@ -649,143 +649,9 @@ static void ioda_eeh_hub_diag(struct pci } } -static void ioda_eeh_p7ioc_phb_diag (struct pci_controller *hose, -struct OpalIoPhbErrorCommon *common) -{ -struct OpalIoP7IOCPhbErrorData *data; -int i; - - data = (struct OpalIoP7IOCPhbErrorData *)common; - -pr_info ("P7IOC PHB#%x Diag-data (Version: %d)\n\n" , - hose->global_number, common->version); - -pr_info (" brdgCtl: %08x\n" , data->brdgCtl); - -pr_info (" portStatusReg: %08x\n" , data->portStatusReg); -pr_info (" rootCmplxStatus: %08x\n" , data->rootCmplxStatus); -pr_info (" busAgentStatus: %08x\n" , data->busAgentStatus); - -pr_info (" deviceStatus: %08x\n" , data->deviceStatus); -pr_info (" slotStatus: %08x\n" , data->slotStatus); -pr_info (" linkStatus: %08x\n" , data->linkStatus); -pr_info (" devCmdStatus: %08x\n" , data->devCmdStatus); -pr_info (" devSecStatus: %08x\n" , data->devSecStatus); - -pr_info (" rootErrorStatus: %08x\n" , data->rootErrorStatus); -pr_info (" uncorrErrorStatus: %08x\n" , data->uncorrErrorStatus); -pr_info (" corrErrorStatus: %08x\n" , data->corrErrorStatus); -pr_info (" tlpHdr1: %08x\n" , data->tlpHdr1); -pr_info (" tlpHdr2: %08x\n" , data->tlpHdr2); -pr_info (" tlpHdr3: %08x\n" , data->tlpHdr3); -pr_info (" tlpHdr4: %08x\n" , data->tlpHdr4); -pr_info (" sourceId: %08x\n" , data->sourceId); - -pr_info (" errorClass: %016llx\n" , data->errorClass); -pr_info (" correlator: %016llx\n" , data->correlator); -pr_info (" p7iocPlssr: %016llx\n" , data->p7iocPlssr); -pr_info (" p7iocCsr: %016llx\n" , data->p7iocCsr); -pr_info (" lemFir: %016llx\n" , data->lemFir); -pr_info (" lemErrorMask: %016llx\n" , data->lemErrorMask); -pr_info (" lemWOF: %016llx\n" , data->lemWOF); -pr_info (" phbErrorStatus: %016llx\n" , data->phbErrorStatus); -pr_info (" phbFirstErrorStatus: %016llx\n" , data->phbFirstErrorStatus); -pr_info (" phbErrorLog0: %016llx\n" , data->phbErrorLog0); -pr_info (" phbErrorLog1: %016llx\n" , data->phbErrorLog1); -pr_info (" mmioErrorStatus: %016llx\n" , data->mmioErrorStatus); -pr_info (" mmioFirstErrorStatus: %016llx\n" , data->mmioFirstErrorStatus); -pr_info (" mmioErrorLog0: %016llx\n" , data->mmioErrorLog0); -pr_info (" mmioErrorLog1: %016llx\n" , data->mmioErrorLog1); -pr_info (" dma0ErrorStatus: %016llx\n" , data->dma0ErrorStatus); -pr_info (" dma0FirstErrorStatus: %016llx\n" , data->dma0FirstErrorStatus); -pr_info (" dma0ErrorLog0: %016llx\n" , data->dma0ErrorLog0); -pr_info (" dma0ErrorLog1: %016llx\n" , data->dma0ErrorLog1); -pr_info (" dma1ErrorStatus: %016llx\n" , data->dma1ErrorStatus); -pr_info (" dma1FirstErrorStatus: %016llx\n" , data->dma1FirstErrorStatus); -pr_info (" dma1ErrorLog0: %016llx\n" , data->dma1ErrorLog0); -pr_info (" dma1ErrorLog1: %016llx\n" , data->dma1ErrorLog1); - -for (i =0 ; i <OPAL_P7IOC_NUM_PEST_REGS ; i++) { -if ((data->pestA[i] >>63 ) ==0 && - (data->pestB[i] >>63 ) ==0 ) -continue ; - -pr_info (" PE[%3d] PESTA: %016llx\n" , i, data->pestA[i]); -pr_info (" PESTB: %016llx\n" , data->pestB[i]); - } -} - -static void ioda_eeh_phb3_phb_diag (struct pci_controller *hose, -struct OpalIoPhbErrorCommon *common) -{ -struct OpalIoPhb3ErrorData *data; -int i; - - data = (struct OpalIoPhb3ErrorData *)common; -pr_info ("PHB3 PHB#%x Diag-data (Version: %d)\n\n" , - hose->global_number, common->version); - -pr_info (" brdgCtl: %08x\n" , data->brdgCtl); - -pr_info (" portStatusReg: %08x\n" , data->portStatusReg); -pr_info (" rootCmplxStatus: %08x\n" , data->rootCmplxStatus); -pr_info (" busAgentStatus: %08x\n" , data->busAgentStatus); - -pr_info (" deviceStatus: %08x\n" , data->deviceStatus); -pr_info (" slotStatus: %08x\n" , data->slotStatus); -pr_info (" linkStatus: %08x\n" , data->linkStatus); -pr_info (" devCmdStatus: %08x\n" , data->devCmdStatus); -pr_info (" devSecStatus: %08x\n" , data->devSecStatus); - -pr_info (" rootErrorStatus: %08x\n" , data->rootErrorStatus); -pr_info (" uncorrErrorStatus: %08x\n" , data->uncorrErrorStatus); -pr_info (" corrErrorStatus: %08x\n" , data->corrErrorStatus); -pr_info (" tlpHdr1: %08x\n" , data->tlpHdr1); -pr_info (" tlpHdr2: %08x\n" , data->tlpHdr2); -pr_info (" tlpHdr3: %08x\n" , data->tlpHdr3); -pr_info (" tlpHdr4: %08x\n" , data->tlpHdr4); -pr_info (" sourceId: %08x\n" , data->sourceId); -pr_info (" errorClass: %016llx\n" , data->errorClass); -pr_info (" correlator: %016llx\n" , data->correlator); -pr_info (" nFir: %016llx\n" , data->nFir); -pr_info (" nFirMask: %016llx\n" , data->nFirMask); -pr_info (" nFirWOF: %016llx\n" , data->nFirWOF); -pr_info (" PhbPlssr: %016llx\n" , data->phbPlssr); -pr_info (" PhbCsr: %016llx\n" , data->phbCsr); -pr_info (" lemFir: %016llx\n" , data->lemFir); -pr_info (" lemErrorMask: %016llx\n" , data->lemErrorMask); -pr_info (" lemWOF: %016llx\n" , data->lemWOF); -pr_info (" phbErrorStatus: %016llx\n" , data->phbErrorStatus); -pr_info (" phbFirstErrorStatus: %016llx\n" , data->phbFirstErrorStatus); -pr_info (" phbErrorLog0: %016llx\n" , data->phbErrorLog0); -pr_info (" phbErrorLog1: %016llx\n" , data->phbErrorLog1); -pr_info (" mmioErrorStatus: %016llx\n" , data->mmioErrorStatus); -pr_info (" mmioFirstErrorStatus: %016llx\n" , data->mmioFirstErrorStatus); -pr_info (" mmioErrorLog0: %016llx\n" , data->mmioErrorLog0); -pr_info (" mmioErrorLog1: %016llx\n" , data->mmioErrorLog1); -pr_info (" dma0ErrorStatus: %016llx\n" , data->dma0ErrorStatus); -pr_info (" dma0FirstErrorStatus: %016llx\n" , data->dma0FirstErrorStatus); -pr_info (" dma0ErrorLog0: %016llx\n" , data->dma0ErrorLog0); -pr_info (" dma0ErrorLog1: %016llx\n" , data->dma0ErrorLog1); -pr_info (" dma1ErrorStatus: %016llx\n" , data->dma1ErrorStatus); -pr_info (" dma1FirstErrorStatus: %016llx\n" , data->dma1FirstErrorStatus); -pr_info (" dma1ErrorLog0: %016llx\n" , data->dma1ErrorLog0); -pr_info (" dma1ErrorLog1: %016llx\n" , data->dma1ErrorLog1); - -for (i =0 ; i <OPAL_PHB3_NUM_PEST_REGS ; i++) { -if ((data->pestA[i] >>63 ) ==0 && - (data->pestB[i] >>63 ) ==0 ) -continue ; - -pr_info (" PE[%3d] PESTA: %016llx\n" , i, data->pestA[i]); -pr_info (" PESTB: %016llx\n" , data->pestB[i]); - } -} -static void ioda_eeh_phb_diag (struct pci_controller *hose) {struct pnv_phb *phb = hose->private_data; -struct OpalIoPhbErrorCommon *common;long rc; rc = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag.blob,
@@ -796,18 +662,7 @@ static void ioda_eeh_phb_diag(struct pcireturn ; } - common = (struct OpalIoPhbErrorCommon *)phb->diag.blob; -switch (common->ioType) { -case OPAL_PHB_ERROR_DATA_TYPE_P7IOC : -ioda_eeh_p7ioc_phb_diag (hose, common); -break ; -case OPAL_PHB_ERROR_DATA_TYPE_PHB3 : -ioda_eeh_phb3_phb_diag (hose, common); -break ; -default : -pr_warning ("%s: Unrecognized I/O chip %d\n" , - __func__, common->ioType); - } +pnv_pci_dump_phb_diag_data (hose, phb->diag.blob); } static int ioda_eeh_get_phb_pe(struct pci_controller *hose,
arch/powerpc/platforms/powernv/pci.c +137 -57
221 lines not on this page · raw message
arch/powerpc/platforms/powernv/pci.h +3 -0
@@ -177,6 +177,7 @@ struct pnv_phb {unsigned char blob[PNV_PCI_DIAG_BUF_SIZE ];struct OpalIoP7IOCPhbErrorData p7ioc;struct OpalIoP7IOCErrorData hub_diag; +struct OpalIoPhb3ErrorData phb3; } diag; };
@@ -186,6 +187,8 @@ extern struct pci_ops pnv_pci_ops;extern struct pnv_eeh_ops ioda_eeh_ops;#endif +void pnv_pci_dump_phb_diag_data (struct pci_controller *hose, +unsigned char *log_buff);int pnv_pci_cfg_read (struct device_node *dn,int where,int size,u32 *val); int pnv_pci_cfg_write(struct device_node *dn,
Greg Kroah-Hartman
maintainerPATCH 31/46 powerpc/eeh: Handle multiple EEH errors
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <[email protected]>
commit 7e4e7867b1e551b7b8f326da3604c47332972bc6 upstream.
For one PCI error relevant OPAL event, we possibly have multiple EEH errors for that. For example, multiple frozen PEs detected on different PHBs. Unfortunately, we didn't cover the case. The patch enumarates the return value from eeh_ops::next_error() and change eeh_handle_special_event() and eeh_ops::next_error() to handle all existing EEH errors.
As Ben pointed out, we needn't list_for_each_entry_safe() since we are not deleting any PHB from the hose_list and the EEH serialized lock should be held while purging EEH events. The patch covers those suggestions as well.
--- arch/powerpc/include/asm/eeh.h | 10 ++ arch/powerpc/kernel/eeh_driver.c | 150 +++++++++++++++--------------- arch/powerpc/platforms/powernv/eeh-ioda.c | 39 ++++--- 3 files changed, 112 insertions(+), 87 deletions(-)
arch/powerpc/include/asm/eeh.h +10 -0
@@ -117,6 +117,16 @@ static inline struct pci_dev *eeh_dev_toreturn edev ? edev->pdev :NULL ; } +/* Return values from eeh_ops::next_error */ +enum { +EEH_NEXT_ERR_NONE =0 , +EEH_NEXT_ERR_INF , +EEH_NEXT_ERR_FROZEN_PE , +EEH_NEXT_ERR_FENCED_PHB , +EEH_NEXT_ERR_DEAD_PHB , +EEH_NEXT_ERR_DEAD_IOC +}; +/* * The struct is used to trace the registered EEH operation * callback functions. Actually, those operation callback
arch/powerpc/kernel/eeh_driver.c +78 -72
162 lines not on this page · raw message
arch/powerpc/platforms/powernv/eeh-ioda.c +24 -15
@@ -718,12 +718,12 @@ static int ioda_eeh_get_pe(struct pci_co*/ static int ioda_eeh_next_error (struct eeh_pe **pe) { -struct pci_controller *hose, *tmp; +struct pci_controller *hose;struct pnv_phb *phb;u64 frozen_pe_no;u16 err_type, severity;long rc; -int ret =1 ; +int ret =EEH_NEXT_ERR_NONE ;/* * While running here, it's safe to purge the event queue.
@@ -733,7 +733,7 @@ static int ioda_eeh_next_error(struct eeeeh_remove_event (NULL );opal_notifier_update_evt (OPAL_EVENT_PCI_ERROR ,0x0ul ); -list_for_each_entry_safe (hose, tmp, &hose_list, list_node) { +list_for_each_entry (hose, &hose_list, list_node) {/* * If the subordinate PCI buses of the PHB has been * removed, we needn't take care of it any more.
@@ -772,19 +772,19 @@ static int ioda_eeh_next_error(struct eeswitch (err_type) {case OPAL_EEH_IOC_ERROR :if (severity ==OPAL_EEH_SEV_IOC_DEAD ) { -list_for_each_entry_safe (hose, tmp, - &hose_list, list_node) { +list_for_each_entry (hose, &hose_list, + list_node) { phb = hose->private_data; phb->eeh_state |=PNV_EEH_STATE_REMOVED ; }pr_err ("EEH: dead IOC detected\n" ); - ret =4 ; - goto out; + ret =EEH_NEXT_ERR_DEAD_IOC ; }else if (severity ==OPAL_EEH_SEV_INF ) {pr_info ("EEH: IOC informative error " "detected\n" );ioda_eeh_hub_diag (hose); + ret =EEH_NEXT_ERR_NONE ; }break ;
@@ -796,21 +796,20 @@ static int ioda_eeh_next_error(struct eepr_err ("EEH: dead PHB#%x detected\n" , hose->global_number); phb->eeh_state |=PNV_EEH_STATE_REMOVED ; - ret =3 ; - goto out; + ret =EEH_NEXT_ERR_DEAD_PHB ; }else if (severity ==OPAL_EEH_SEV_PHB_FENCED ) {if (ioda_eeh_get_phb_pe (hose, pe))break ;pr_err ("EEH: fenced PHB#%x detected\n" , hose->global_number); - ret =2 ; - goto out; + ret =EEH_NEXT_ERR_FENCED_PHB ; }else if (severity ==OPAL_EEH_SEV_INF ) {pr_info ("EEH: PHB#%x informative error " "detected\n" , hose->global_number);ioda_eeh_phb_diag (hose); + ret =EEH_NEXT_ERR_NONE ; }break ;
@@ -820,13 +819,23 @@ static int ioda_eeh_next_error(struct eepr_err ("EEH: Frozen PE#%x on PHB#%x detected\n" , (*pe)->addr, (*pe)->phb->global_number); - ret =1 ; - goto out; + ret =EEH_NEXT_ERR_FROZEN_PE ; +break ; +default : +pr_warn ("%s: Unexpected error type %d\n" , + __func__, err_type); } + +/* +* If we have no errors on the specific PHB or only +* informative error there, we continue poking it. +* Otherwise, we need actions to be taken by upper +* layer. +*/ +if (ret >EEH_NEXT_ERR_INF ) +break ; } - ret =0 ; -out:return ret; }
Greg Kroah-Hartman
maintainerPATCH 32/46 powerpc/powernv: Dump PHB diag-data immediately
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <[email protected]>
commit 947166043732b69878123bf31f51933ad0316080 upstream.
The PHB diag-data is important to help locating the root cause for EEH errors such as frozen PE or fenced PHB. However, the EEH core enables IO path by clearing part of HW registers before collecting this data causing it to be corrupted.
This patch fixes this by dumping the PHB diag-data immediately when frozen/fenced state on PE or PHB is detected for the first time in eeh_ops::get_state() or next_error() backend.
--- arch/powerpc/platforms/powernv/eeh-ioda.c | 99 +++++++++++++----------------- 1 file changed, 43 insertions(+), 56 deletions(-)
arch/powerpc/platforms/powernv/eeh-ioda.c +43 -56
@@ -114,6 +114,7 @@ DEFINE_SIMPLE_ATTRIBUTE(ioda_eeh_inbB_db ioda_eeh_inbB_dbgfs_set, "0x%llx\n");#endif /* CONFIG_DEBUG_FS */ +/** * ioda_eeh_post_init - Chip dependent post initialization * @hose: PCI controller
@@ -221,6 +222,22 @@ static int ioda_eeh_set_option(struct eereturn ret; } +static void ioda_eeh_phb_diag (struct pci_controller *hose) +{ +struct pnv_phb *phb = hose->private_data; +long rc; + + rc =opal_pci_get_phb_diag_data2 (phb->opal_id, phb->diag.blob, +PNV_PCI_DIAG_BUF_SIZE ); +if (rc !=OPAL_SUCCESS ) { +pr_warning ("%s: Failed to get diag-data for PHB#%x (%ld)\n" , + __func__, hose->global_number, rc); +return ; + } + +pnv_pci_dump_phb_diag_data (hose, phb->diag.blob); +} +/** * ioda_eeh_get_state - Retrieve the state of PE * @pe: EEH PE
@@ -272,6 +289,9 @@ static int ioda_eeh_get_state(struct eeh result |=EEH_STATE_DMA_ACTIVE ; result |=EEH_STATE_MMIO_ENABLED ; result |=EEH_STATE_DMA_ENABLED ; + }else if (!(pe->state &EEH_PE_ISOLATED )) { +eeh_pe_state_mark (pe,EEH_PE_ISOLATED ); +ioda_eeh_phb_diag (hose); }return result;
@@ -315,6 +335,15 @@ static int ioda_eeh_get_state(struct eeh __func__, fstate, hose->global_number, pe_no); } +/* Dump PHB diag-data for frozen PE */ +if (result !=EEH_STATE_NOT_SUPPORT && + (result & (EEH_STATE_MMIO_ACTIVE |EEH_STATE_DMA_ACTIVE )) != + (EEH_STATE_MMIO_ACTIVE |EEH_STATE_DMA_ACTIVE ) && + !(pe->state &EEH_PE_ISOLATED )) { +eeh_pe_state_mark (pe,EEH_PE_ISOLATED ); +ioda_eeh_phb_diag (hose); + } +return result; }
@@ -530,45 +559,6 @@ static int ioda_eeh_reset(struct eeh_pe }/** -* ioda_eeh_get_log - Retrieve error log -* @pe: EEH PE -* @severity: Severity level of the log -* @drv_log: buffer to store the log -* @len: space of the log buffer -* -* The function is used to retrieve error log from P7IOC. -*/ -static int ioda_eeh_get_log (struct eeh_pe *pe,int severity, -char *drv_log,unsigned long len) -{ -s64 ret; -unsigned long flags; -struct pci_controller *hose = pe->phb; -struct pnv_phb *phb = hose->private_data; - -spin_lock_irqsave (&phb->lock, flags); - - ret =opal_pci_get_phb_diag_data2 (phb->opal_id, - phb->diag.blob,PNV_PCI_DIAG_BUF_SIZE ); -if (ret) { -spin_unlock_irqrestore (&phb->lock, flags); -pr_warning ("%s: Can't get log for PHB#%x-PE#%x (%lld)\n" , - __func__, hose->global_number, pe->addr, ret); -return -EIO ; - } - -/* -* FIXME: We probably need log the error in somewhere. -* Lets make it up in future. -*/ -/* pr_info("%s", phb->diag.blob); */ - -spin_unlock_irqrestore (&phb->lock, flags); - -return 0 ; -} - -/** * ioda_eeh_configure_bridge - Configure the PCI bridges for the indicated PE * @pe: EEH PE *
@@ -649,22 +639,6 @@ static void ioda_eeh_hub_diag(struct pci } } -static void ioda_eeh_phb_diag (struct pci_controller *hose) -{ -struct pnv_phb *phb = hose->private_data; -long rc; - - rc =opal_pci_get_phb_diag_data2 (phb->opal_id, phb->diag.blob, -PNV_PCI_DIAG_BUF_SIZE ); -if (rc !=OPAL_SUCCESS ) { -pr_warning ("%s: Failed to get diag-data for PHB#%x (%ld)\n" , - __func__, hose->global_number, rc); -return ; - } - -pnv_pci_dump_phb_diag_data (hose, phb->diag.blob); -} -static int ioda_eeh_get_phb_pe (struct pci_controller *hose,struct eeh_pe **pe) {
@@ -827,6 +801,20 @@ static int ioda_eeh_next_error(struct ee }/* +* EEH core will try recover from fenced PHB or +* frozen PE. In the time for frozen PE, EEH core +* enable IO path for that before collecting logs, +* but it ruins the site. So we have to dump the +* log in advance here. +*/ +if ((ret ==EEH_NEXT_ERR_FROZEN_PE || + ret ==EEH_NEXT_ERR_FENCED_PHB ) && + !((*pe)->state &EEH_PE_ISOLATED )) { +eeh_pe_state_mark (*pe,EEH_PE_ISOLATED ); +ioda_eeh_phb_diag (hose); + } + +/* * If we have no errors on the specific PHB or only * informative error there, we continue poking it. * Otherwise, we need actions to be taken by upper
@@ -844,7 +832,6 @@ struct pnv_eeh_ops ioda_eeh_ops = { .set_option = ioda_eeh_set_option, .get_state = ioda_eeh_get_state, .reset = ioda_eeh_reset, - .get_log = ioda_eeh_get_log, .configure_bridge = ioda_eeh_configure_bridge, .next_error = ioda_eeh_next_error };
Greg Kroah-Hartman
maintainerPATCH 33/46 powerpc/powernv: Refactor PHB diag-data dump
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <[email protected]>
commit af87d2fe95444d107e0c0cf0ba7e20e6716a7bfd upstream.
As Ben suggested, the patch prints PHB diag-data with multiple fields in one line and omits the line if the fields of that line are all zero.
With the patch applied, the PHB3 diag-data dump looks like:
PHB3 PHB#3 Diag-data (Version: 1)
brdgCtl: 00000002 RootSts: 0000000f 00400000 b0830008 00100147 00002000 nFir: 0000000000000000 0030006e00000000 0000000000000000 PhbSts: 0000001c00000000 0000000000000000 Lem: 0000000000100000 42498e327f502eae 0000000000000000 InAErr: 8000000000000000 8000000000000000 0402030000000000 0000000000000000
PE[ 8] A/B: 8480002b00000000 8000000000000000
[ The current diag data is so big that it overflows the printk
buffer pretty quickly in cases when we get a handful of errors at once which can happen. --BenH
]
--- arch/powerpc/platforms/powernv/pci.c | 220 +++++++++++++++++++---------------- 1 file changed, 125 insertions(+), 95 deletions(-)
arch/powerpc/platforms/powernv/pci.c +125 -95
@@ -134,57 +134,72 @@ static void pnv_pci_dump_p7ioc_diag_datapr_info ("P7IOC PHB#%d Diag-data (Version: %d)\n\n" , hose->global_number, common->version); -pr_info (" brdgCtl: %08x\n" , data->brdgCtl); - -pr_info (" portStatusReg: %08x\n" , data->portStatusReg); -pr_info (" rootCmplxStatus: %08x\n" , data->rootCmplxStatus); -pr_info (" busAgentStatus: %08x\n" , data->busAgentStatus); - -pr_info (" deviceStatus: %08x\n" , data->deviceStatus); -pr_info (" slotStatus: %08x\n" , data->slotStatus); -pr_info (" linkStatus: %08x\n" , data->linkStatus); -pr_info (" devCmdStatus: %08x\n" , data->devCmdStatus); -pr_info (" devSecStatus: %08x\n" , data->devSecStatus); - -pr_info (" rootErrorStatus: %08x\n" , data->rootErrorStatus); -pr_info (" uncorrErrorStatus: %08x\n" , data->uncorrErrorStatus); -pr_info (" corrErrorStatus: %08x\n" , data->corrErrorStatus); -pr_info (" tlpHdr1: %08x\n" , data->tlpHdr1); -pr_info (" tlpHdr2: %08x\n" , data->tlpHdr2); -pr_info (" tlpHdr3: %08x\n" , data->tlpHdr3); -pr_info (" tlpHdr4: %08x\n" , data->tlpHdr4); -pr_info (" sourceId: %08x\n" , data->sourceId); -pr_info (" errorClass: %016llx\n" , data->errorClass); -pr_info (" correlator: %016llx\n" , data->correlator); -pr_info (" p7iocPlssr: %016llx\n" , data->p7iocPlssr); -pr_info (" p7iocCsr: %016llx\n" , data->p7iocCsr); -pr_info (" lemFir: %016llx\n" , data->lemFir); -pr_info (" lemErrorMask: %016llx\n" , data->lemErrorMask); -pr_info (" lemWOF: %016llx\n" , data->lemWOF); -pr_info (" phbErrorStatus: %016llx\n" , data->phbErrorStatus); -pr_info (" phbFirstErrorStatus: %016llx\n" , data->phbFirstErrorStatus); -pr_info (" phbErrorLog0: %016llx\n" , data->phbErrorLog0); -pr_info (" phbErrorLog1: %016llx\n" , data->phbErrorLog1); -pr_info (" mmioErrorStatus: %016llx\n" , data->mmioErrorStatus); -pr_info (" mmioFirstErrorStatus: %016llx\n" , data->mmioFirstErrorStatus); -pr_info (" mmioErrorLog0: %016llx\n" , data->mmioErrorLog0); -pr_info (" mmioErrorLog1: %016llx\n" , data->mmioErrorLog1); -pr_info (" dma0ErrorStatus: %016llx\n" , data->dma0ErrorStatus); -pr_info (" dma0FirstErrorStatus: %016llx\n" , data->dma0FirstErrorStatus); -pr_info (" dma0ErrorLog0: %016llx\n" , data->dma0ErrorLog0); -pr_info (" dma0ErrorLog1: %016llx\n" , data->dma0ErrorLog1); -pr_info (" dma1ErrorStatus: %016llx\n" , data->dma1ErrorStatus); -pr_info (" dma1FirstErrorStatus: %016llx\n" , data->dma1FirstErrorStatus); -pr_info (" dma1ErrorLog0: %016llx\n" , data->dma1ErrorLog0); -pr_info (" dma1ErrorLog1: %016llx\n" , data->dma1ErrorLog1); +if (data->brdgCtl) +pr_info (" brdgCtl: %08x\n" , + data->brdgCtl); +if (data->portStatusReg || data->rootCmplxStatus || + data->busAgentStatus) +pr_info (" UtlSts: %08x %08x %08x\n" , + data->portStatusReg, data->rootCmplxStatus, + data->busAgentStatus); +if (data->deviceStatus || data->slotStatus || + data->linkStatus || data->devCmdStatus || + data->devSecStatus) +pr_info (" RootSts: %08x %08x %08x %08x %08x\n" , + data->deviceStatus, data->slotStatus, + data->linkStatus, data->devCmdStatus, + data->devSecStatus); +if (data->rootErrorStatus || data->uncorrErrorStatus || + data->corrErrorStatus) +pr_info (" RootErrSts: %08x %08x %08x\n" , + data->rootErrorStatus, data->uncorrErrorStatus, + data->corrErrorStatus); +if (data->tlpHdr1 || data->tlpHdr2 || + data->tlpHdr3 || data->tlpHdr4) +pr_info (" RootErrLog: %08x %08x %08x %08x\n" , + data->tlpHdr1, data->tlpHdr2, + data->tlpHdr3, data->tlpHdr4); +if (data->sourceId || data->errorClass || + data->correlator) +pr_info (" RootErrLog1: %08x %016llx %016llx\n" , + data->sourceId, data->errorClass, + data->correlator); +if (data->p7iocPlssr || data->p7iocCsr) +pr_info (" PhbSts: %016llx %016llx\n" , + data->p7iocPlssr, data->p7iocCsr); +if (data->lemFir || data->lemErrorMask || + data->lemWOF) +pr_info (" Lem: %016llx %016llx %016llx\n" , + data->lemFir, data->lemErrorMask, + data->lemWOF); +if (data->phbErrorStatus || data->phbFirstErrorStatus || + data->phbErrorLog0 || data->phbErrorLog1) +pr_info (" PhbErr: %016llx %016llx %016llx %016llx\n" , + data->phbErrorStatus, data->phbFirstErrorStatus, + data->phbErrorLog0, data->phbErrorLog1); +if (data->mmioErrorStatus || data->mmioFirstErrorStatus || + data->mmioErrorLog0 || data->mmioErrorLog1) +pr_info (" OutErr: %016llx %016llx %016llx %016llx\n" , + data->mmioErrorStatus, data->mmioFirstErrorStatus, + data->mmioErrorLog0, data->mmioErrorLog1); +if (data->dma0ErrorStatus || data->dma0FirstErrorStatus || + data->dma0ErrorLog0 || data->dma0ErrorLog1) +pr_info (" InAErr: %016llx %016llx %016llx %016llx\n" , + data->dma0ErrorStatus, data->dma0FirstErrorStatus, + data->dma0ErrorLog0, data->dma0ErrorLog1); +if (data->dma1ErrorStatus || data->dma1FirstErrorStatus || + data->dma1ErrorLog0 || data->dma1ErrorLog1) +pr_info (" InBErr: %016llx %016llx %016llx %016llx\n" , + data->dma1ErrorStatus, data->dma1FirstErrorStatus, + data->dma1ErrorLog0, data->dma1ErrorLog1);for (i =0 ; i <OPAL_P7IOC_NUM_PEST_REGS ; i++) {if ((data->pestA[i] >>63 ) ==0 && (data->pestB[i] >>63 ) ==0 )continue ; -pr_info (" PE[%3d] PESTA: %016llx\n" , i, data->pestA[i]); -pr_info (" PESTB: %016llx\n" , data->pestB[i]); +pr_info (" PE[%3d] A/B: %016llx %016llx\n" , + i, data->pestA[i], data->pestB[i]); } }
@@ -197,62 +212,77 @@ static void pnv_pci_dump_phb3_diag_data( data = (struct OpalIoPhb3ErrorData *)common;pr_info ("PHB3 PHB#%d Diag-data (Version: %d)\n\n" , hose->global_number, common->version); - -pr_info (" brdgCtl: %08x\n" , data->brdgCtl); - -pr_info (" portStatusReg: %08x\n" , data->portStatusReg); -pr_info (" rootCmplxStatus: %08x\n" , data->rootCmplxStatus); -pr_info (" busAgentStatus: %08x\n" , data->busAgentStatus); - -pr_info (" deviceStatus: %08x\n" , data->deviceStatus); -pr_info (" slotStatus: %08x\n" , data->slotStatus); -pr_info (" linkStatus: %08x\n" , data->linkStatus); -pr_info (" devCmdStatus: %08x\n" , data->devCmdStatus); -pr_info (" devSecStatus: %08x\n" , data->devSecStatus); - -pr_info (" rootErrorStatus: %08x\n" , data->rootErrorStatus); -pr_info (" uncorrErrorStatus: %08x\n" , data->uncorrErrorStatus); -pr_info (" corrErrorStatus: %08x\n" , data->corrErrorStatus); -pr_info (" tlpHdr1: %08x\n" , data->tlpHdr1); -pr_info (" tlpHdr2: %08x\n" , data->tlpHdr2); -pr_info (" tlpHdr3: %08x\n" , data->tlpHdr3); -pr_info (" tlpHdr4: %08x\n" , data->tlpHdr4); -pr_info (" sourceId: %08x\n" , data->sourceId); -pr_info (" errorClass: %016llx\n" , data->errorClass); -pr_info (" correlator: %016llx\n" , data->correlator); - -pr_info (" nFir: %016llx\n" , data->nFir); -pr_info (" nFirMask: %016llx\n" , data->nFirMask); -pr_info (" nFirWOF: %016llx\n" , data->nFirWOF); -pr_info (" PhbPlssr: %016llx\n" , data->phbPlssr); -pr_info (" PhbCsr: %016llx\n" , data->phbCsr); -pr_info (" lemFir: %016llx\n" , data->lemFir); -pr_info (" lemErrorMask: %016llx\n" , data->lemErrorMask); -pr_info (" lemWOF: %016llx\n" , data->lemWOF); -pr_info (" phbErrorStatus: %016llx\n" , data->phbErrorStatus); -pr_info (" phbFirstErrorStatus: %016llx\n" , data->phbFirstErrorStatus); -pr_info (" phbErrorLog0: %016llx\n" , data->phbErrorLog0); -pr_info (" phbErrorLog1: %016llx\n" , data->phbErrorLog1); -pr_info (" mmioErrorStatus: %016llx\n" , data->mmioErrorStatus); -pr_info (" mmioFirstErrorStatus: %016llx\n" , data->mmioFirstErrorStatus); -pr_info (" mmioErrorLog0: %016llx\n" , data->mmioErrorLog0); -pr_info (" mmioErrorLog1: %016llx\n" , data->mmioErrorLog1); -pr_info (" dma0ErrorStatus: %016llx\n" , data->dma0ErrorStatus); -pr_info (" dma0FirstErrorStatus: %016llx\n" , data->dma0FirstErrorStatus); -pr_info (" dma0ErrorLog0: %016llx\n" , data->dma0ErrorLog0); -pr_info (" dma0ErrorLog1: %016llx\n" , data->dma0ErrorLog1); -pr_info (" dma1ErrorStatus: %016llx\n" , data->dma1ErrorStatus); -pr_info (" dma1FirstErrorStatus: %016llx\n" , data->dma1FirstErrorStatus); -pr_info (" dma1ErrorLog0: %016llx\n" , data->dma1ErrorLog0); -pr_info (" dma1ErrorLog1: %016llx\n" , data->dma1ErrorLog1); +if (data->brdgCtl) +pr_info (" brdgCtl: %08x\n" , + data->brdgCtl); +if (data->portStatusReg || data->rootCmplxStatus || + data->busAgentStatus) +pr_info (" UtlSts: %08x %08x %08x\n" , + data->portStatusReg, data->rootCmplxStatus, + data->busAgentStatus); +if (data->deviceStatus || data->slotStatus || + data->linkStatus || data->devCmdStatus || + data->devSecStatus) +pr_info (" RootSts: %08x %08x %08x %08x %08x\n" , + data->deviceStatus, data->slotStatus, + data->linkStatus, data->devCmdStatus, + data->devSecStatus); +if (data->rootErrorStatus || data->uncorrErrorStatus || + data->corrErrorStatus) +pr_info (" RootErrSts: %08x %08x %08x\n" , + data->rootErrorStatus, data->uncorrErrorStatus, + data->corrErrorStatus); +if (data->tlpHdr1 || data->tlpHdr2 || + data->tlpHdr3 || data->tlpHdr4) +pr_info (" RootErrLog: %08x %08x %08x %08x\n" , + data->tlpHdr1, data->tlpHdr2, + data->tlpHdr3, data->tlpHdr4); +if (data->sourceId || data->errorClass || + data->correlator) +pr_info (" RootErrLog1: %08x %016llx %016llx\n" , + data->sourceId, data->errorClass, + data->correlator); +if (data->nFir || data->nFirMask || + data->nFirWOF) +pr_info (" nFir: %016llx %016llx %016llx\n" , + data->nFir, data->nFirMask, + data->nFirWOF); +if (data->phbPlssr || data->phbCsr) +pr_info (" PhbSts: %016llx %016llx\n" , + data->phbPlssr, data->phbCsr); +if (data->lemFir || data->lemErrorMask || + data->lemWOF) +pr_info (" Lem: %016llx %016llx %016llx\n" , + data->lemFir, data->lemErrorMask, + data->lemWOF); +if (data->phbErrorStatus || data->phbFirstErrorStatus || + data->phbErrorLog0 || data->phbErrorLog1) +pr_info (" PhbErr: %016llx %016llx %016llx %016llx\n" , + data->phbErrorStatus, data->phbFirstErrorStatus, + data->phbErrorLog0, data->phbErrorLog1); +if (data->mmioErrorStatus || data->mmioFirstErrorStatus || + data->mmioErrorLog0 || data->mmioErrorLog1) +pr_info (" OutErr: %016llx %016llx %016llx %016llx\n" , + data->mmioErrorStatus, data->mmioFirstErrorStatus, + data->mmioErrorLog0, data->mmioErrorLog1); +if (data->dma0ErrorStatus || data->dma0FirstErrorStatus || + data->dma0ErrorLog0 || data->dma0ErrorLog1) +pr_info (" InAErr: %016llx %016llx %016llx %016llx\n" , + data->dma0ErrorStatus, data->dma0FirstErrorStatus, + data->dma0ErrorLog0, data->dma0ErrorLog1); +if (data->dma1ErrorStatus || data->dma1FirstErrorStatus || + data->dma1ErrorLog0 || data->dma1ErrorLog1) +pr_info (" InBErr: %016llx %016llx %016llx %016llx\n" , + data->dma1ErrorStatus, data->dma1FirstErrorStatus, + data->dma1ErrorLog0, data->dma1ErrorLog1);for (i =0 ; i <OPAL_PHB3_NUM_PEST_REGS ; i++) {if ((data->pestA[i] >>63 ) ==0 && (data->pestB[i] >>63 ) ==0 )continue ; -pr_info (" PE[%3d] PESTA: %016llx\n" , i, data->pestA[i]); -pr_info (" PESTB: %016llx\n" , data->pestB[i]); +pr_info (" PE[%3d] A/B: %016llx %016llx\n" , + i, data->pestA[i], data->pestB[i]); } }
Greg Kroah-Hartman
maintainerPATCH 34/46 fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists.
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jones <[email protected]>
commit c1d867a54d426b45da017fbe8e585f8a3064ce8d upstream.
Distribution kernels might want to build in support for /proc/device-tree for kernels that might end up running on hardware that doesn't support openfirmware. This results in an empty /proc/device-tree existing. Remove it if the OFW root node doesn't exist.
This situation actually confuses grub2, resulting in install failures. grub2 sees the /proc/device-tree and picks the wrong install target cf.
http://bzr.savannah.gnu.org/lh/grub/trunk/grub/annotate/4300/util/grub-install.in#L311
grub should be more robust, but still, leaving an empty proc dir seems pointless.
Addresses https://bugzilla.redhat.com/show_bug.cgi?id=818378.
--- fs/proc/proc_devtree.c | 1 + 1 file changed, 1 insertion(+)
fs/proc/proc_devtree.c +1 -0
@@ -232,6 +232,7 @@ void __init proc_device_tree_init(void)return ; root =of_find_node_by_path ("/" );if (root ==NULL ) { +remove_proc_entry ("device-tree" ,NULL );pr_debug ("/proc/device-tree: can't find root\n" );return ; }
Greg Kroah-Hartman
maintainerPATCH 35/46 Input: elantech - improve clickpad detection
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit c15bdfd5b9831e4cab8cfc118243956e267dd30e upstream.
The current assumption in the elantech driver that hw version 3 touchpads are never clickpads and hw version 4 touchpads are always clickpads is wrong.
There are several bug reports for this, ie:
https://bugzilla.redhat.com/show_bug.cgi?id=1030802
http://superuser.com/questions/619582/right-elantech-touchpad-button-not-working-in-linux
I've spend a couple of hours wading through various bugzillas, launchpads and forum posts to create a list of fw-versions and capabilities for different laptop models to find a good method to differentiate between clickpads and versions with separate hardware buttons.
Which shows that a device being a clickpad is reliable indicated by bit 12 being set in the fw_version. I've included the gathered list inside the driver, so that we've this info at hand if we need to revisit this later.
--- drivers/input/mouse/elantech.c | 45 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
drivers/input/mouse/elantech.c +42 -3
@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(strucunsigned char *packet = psmouse->packet;input_report_key (dev,BTN_LEFT , packet[0 ] &0x01 ); +input_report_key (dev,BTN_RIGHT , packet[0 ] &0x02 );input_mt_report_pointer_emulation (dev, true);input_sync (dev); }
@@ -984,6 +985,44 @@ static int elantech_get_resolution_v4(st }/* +* Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in +* fw_version for this is based on the following fw_version & caps table: +* +* Laptop-model: fw_version: caps: buttons: +* Acer S3 0x461f00 10, 13, 0e clickpad +* Acer S7-392 0x581f01 50, 17, 0d clickpad +* Acer V5-131 0x461f02 01, 16, 0c clickpad +* Acer V5-551 0x461f00 ? clickpad +* Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons +* Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons +* Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons +* Asus UX31 0x361f00 20, 15, 0e clickpad +* Asus UX32VD 0x361f02 00, 15, 0e clickpad +* Avatar AVIU-145A2 0x361f00 ? clickpad +* Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons +* Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*) +* Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons +* Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad +* Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad +* Samsung NP900X3E-A02 0x575f03 ? clickpad +* Samsung NP-QX410 0x851b00 19, 14, 0c clickpad +* Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons +* Samsung RF710 0x450f00 ? 2 hw buttons +* System76 Pangolin 0x250f01 ? 2 hw buttons +* (*) + 3 trackpoint buttons +*/ +static void elantech_set_buttonpad_prop (struct psmouse *psmouse) +{ +struct input_dev *dev = psmouse->dev; +struct elantech_data *etd = psmouse->private; + +if (etd->fw_version &0x001000 ) { +__set_bit (INPUT_PROP_BUTTONPAD , dev->propbit); +__clear_bit (BTN_RIGHT , dev->keybit); + } +} + +/* * Set the appropriate event bits for the input subsystem */ static int elantech_set_input_params (struct psmouse *psmouse)
@@ -1026,6 +1065,8 @@ static int elantech_set_input_params(str__set_bit (INPUT_PROP_SEMI_MT , dev->propbit);/* fall through */ case 3 : +if (etd->hw_version ==3 ) +elantech_set_buttonpad_prop (psmouse);input_set_abs_params (dev,ABS_X , x_min, x_max,0 ,0 );input_set_abs_params (dev,ABS_Y , y_min, y_max,0 ,0 );if (etd->reports_pressure) {
@@ -1047,9 +1088,7 @@ static int elantech_set_input_params(str*/ psmouse_warn (psmouse,"couldn't query resolution data.\n" ); } -/* v4 is clickpad, with only one button. */ -__set_bit (INPUT_PROP_BUTTONPAD , dev->propbit); -__clear_bit (BTN_RIGHT , dev->keybit); +elantech_set_buttonpad_prop (psmouse);__set_bit (BTN_TOOL_QUADTAP , dev->keybit);/* For X to recognize me as touchpad. */ input_set_abs_params (dev,ABS_X , x_min, x_max,0 ,0 );
Greg Kroah-Hartman
maintainerPATCH 36/46 KVM: MMU: handle invalid root_hpa at __direct_map
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <[email protected]>
commit 989c6b34f6a9480e397b170cc62237e89bf4fdb9 upstream.
It is possible for __direct_map to be called on invalid root_hpa (-1), two examples:
1) try_async_pf -> can_do_async_pf
-> vmx_interrupt_allowed -> nested_vmx_vmexit
2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
Then to load_vmcs12_host_state and kvm_mmu_reset_context.
Check for this possibility, let fault exception be regenerated.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916
--- arch/x86/kvm/mmu.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/kvm/mmu.c +3 -0
@@ -2659,6 +2659,9 @@ static int __direct_map(struct kvm_vcpuint emulate =0 ;gfn_t pseudo_gfn; +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) +return 0 ; +for_each_shadow_entry (vcpu, (u64 )gfn <<PAGE_SHIFT , iterator) {if (iterator.level == level) { mmu_set_spte(vcpu, iterator.sptep, ACC_ALL,
Greg Kroah-Hartman
maintainerPATCH 37/46 KVM: x86: handle invalid root_hpa everywhere
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <[email protected]>
commit 37f6a4e237303549c8676dfe1fd1991ceab512eb upstream.
Rom Freiman <[email protected]> notes other code paths vulnerable to bug fixed by 989c6b34f6a9480e397b.
--- arch/x86/kvm/mmu.c | 9 +++++++++ arch/x86/kvm/paging_tmpl.h | 8 ++++++++ 2 files changed, 17 insertions(+)
arch/x86/kvm/mmu.c +9 -0
@@ -2832,6 +2832,9 @@ static bool fast_page_fault(struct kvm_vbool ret = false;u64 spte =0ull ; +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) +return false; +if (!page_fault_can_be_fast (error_code))return false;
@@ -3227,6 +3230,9 @@ static u64 walk_shadow_page_get_mmio_sptstruct kvm_shadow_walk_iterator iterator;u64 spte =0ull ; +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) +return spte; +walk_shadow_page_lockless_begin (vcpu);for_each_shadow_entry_lockless (vcpu, addr, iterator, spte)if (!is_shadow_present_pte (spte))
@@ -4513,6 +4519,9 @@ int kvm_mmu_get_spte_hierarchy(struct kvu64 spte;int nr_sptes =0 ; +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) +return nr_sptes; +walk_shadow_page_lockless_begin (vcpu);for_each_shadow_entry_lockless (vcpu, addr, iterator, spte) { sptes[iterator.level-1 ] = spte;
arch/x86/kvm/paging_tmpl.h +8 -0
@@ -569,6 +569,9 @@ static int FNAME(fetch)(struct kvm_vcpuif (FNAME (gpte_changed)(vcpu, gw, top_level)) goto out_gpte_changed; +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) + goto out_gpte_changed; +for (shadow_walk_init (&it, vcpu, addr);shadow_walk_okay (&it) && it.level > gw->level;shadow_walk_next (&it)) {
@@ -820,6 +823,11 @@ static void FNAME(invlpg)(struct kvm_vcp*/ mmu_topup_memory_caches (vcpu); +if (!VALID_PAGE (vcpu->arch.mmu.root_hpa)) { +WARN_ON (1 ); +return ; + } +spin_lock (&vcpu->kvm->mmu_lock);for_each_shadow_entry (vcpu, gva, iterator) { level = iterator.level;
Greg Kroah-Hartman
maintainerPATCH 38/46 KVM: VMX: fix use after free of vmx->loaded_vmcs
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <[email protected]>
commit 26a865f4aa8e66a6d94958de7656f7f1b03c6c56 upstream.
After free_loaded_vmcs executes, the "loaded_vmcs" structure is kfreed, and now vmx->loaded_vmcs points to a kfreed area. Subsequent free_loaded_vmcs then attempts to manipulate vmx->loaded_vmcs.
Switch the order to avoid the problem.
https://bugzilla.redhat.com/show_bug.cgi?id=1047892
--- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +1 -1
@@ -7332,8 +7332,8 @@ static void vmx_free_vcpu(struct kvm_vcpstruct vcpu_vmx *vmx =to_vmx (vcpu);free_vpid (vmx); -free_nested (vmx);free_loaded_vmcs (vmx->loaded_vmcs); +free_nested (vmx);kfree (vmx->guest_msrs);kvm_vcpu_uninit (vcpu);kmem_cache_free (kvm_vcpu_cache, vmx);
Greg Kroah-Hartman
maintainerPATCH 39/46 Input: wacom - make sure touch_max is set for touch devices
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <[email protected]>
commit 1d0d6df02750b4a6f466768cbfbf860e24f4c8d4 upstream.
Old single touch Tablet PCs do not have touch_max set at wacom_features. Since touch device at lease supports one finger, assign touch_max to 1 when touch usage is defined in its HID Descriptor and touch_max is not pre-defined.
--- drivers/input/tablet/wacom_sys.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/input/tablet/wacom_sys.c +5 -2
@@ -304,7 +304,7 @@ static int wacom_parse_hid(struct usb_instruct usb_device *dev =interface_to_usbdev (intf);char limit =0 ;/* result has to be defined as int for some devices */ -int result =0 ; +int result =0 , touch_max =0 ;int i =0 , usage =WCM_UNDEFINED , finger =0 , pen =0 ;unsigned char *report;
@@ -351,7 +351,8 @@ static int wacom_parse_hid(struct usb_inif (usage ==WCM_DESKTOP ) {if (finger) { features->device_type =BTN_TOOL_FINGER ; - +/* touch device at least supports one touch point */ + touch_max =1 ;switch (features->type) {case TABLETPC2FG : features->pktlen =WACOM_PKGLEN_TPC2FG ;
@@ -504,6 +505,8 @@ static int wacom_parse_hid(struct usb_in } out: +if (!features->touch_max && touch_max) + features->touch_max = touch_max; result =0 ;kfree (report);return result;
Greg Kroah-Hartman
maintainerPATCH 40/46 Input: wacom - add support for three new Intuos devices
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <[email protected]>
commit b5fd2a3e92ca5c8c1f3c20d31ac5daed3ec4d604 upstream.
Two tablets in this series support both pen and touch. One (Intuos S) only supports pen. This patch also updates the driver to process wireless devices that do not support touch interface.
--- drivers/input/tablet/wacom_sys.c | 6 +-- drivers/input/tablet/wacom_wac.c | 61 +++++++++++++++++++++++++++++---------- drivers/input/tablet/wacom_wac.h | 2 + 3 files changed, 51 insertions(+), 18 deletions(-)
drivers/input/tablet/wacom_sys.c +3 -3
@@ -1202,7 +1202,8 @@ static void wacom_wireless_work(struct w goto fail;/* Touch interface */ -if (wacom_wac1->features.touch_max) { +if (wacom_wac1->features.touch_max || + wacom_wac1->features.type ==INTUOSHT ) { wacom_wac2->features = *((struct wacom_features *)id->driver_info); wacom_wac2->features.pktlen =WACOM_PKGLEN_BBTOUCH3 ;
@@ -1325,7 +1326,7 @@ static int wacom_probe(struct usb_interf* HID descriptor. If this is the touch interface (wMaxPacketSize * of WACOM_PKGLEN_BBTOUCH3), override the table values. */ -if (features->type >=INTUOS5S && features->type <=INTUOSPL ) { +if (features->type >=INTUOS5S && features->type <=INTUOSHT ) {if (endpoint->wMaxPacketSize ==WACOM_PKGLEN_BBTOUCH3 ) { features->device_type =BTN_TOOL_FINGER ; features->pktlen =WACOM_PKGLEN_BBTOUCH3 ;
@@ -1395,7 +1396,6 @@ static int wacom_probe(struct usb_interf goto fail5; } } -return 0 ; fail5:wacom_destroy_leds (wacom);
drivers/input/tablet/wacom_wac.c +46 -15
128 lines not on this page · raw message
drivers/input/tablet/wacom_wac.h +2 -0
@@ -54,6 +54,7 @@#define WACOM_REPORT_TPCST 16#define WACOM_REPORT_TPC1FGE 18#define WACOM_REPORT_24HDT 1 +#define WACOM_REPORT_WL 128/* device quirks */ #define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -81,6 +82,7 @@ enum {INTUOSPS ,INTUOSPM ,INTUOSPL , +INTUOSHT ,WACOM_21UX2 ,WACOM_22HD , DTK,
Greg Kroah-Hartman
maintainerPATCH 41/46 Input: wacom - add reporting of SW_MUTE_DEVICE events
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <[email protected]>
commit 961794a00eab03f4344b7d5e825e8e789e55da87 upstream.
New Intuos series models added a hardware switch to turn touch data on/off. The state of the switch is reported periodically from the tablet. To report the state the driver will emit SW_MUTE_DEVICE events.
Reviewed_by: Chris Bagwell <[email protected]>
--- drivers/input/tablet/wacom_sys.c | 12 ++++++++++++ drivers/input/tablet/wacom_wac.c | 30 +++++++++++++++++++++++++++--- drivers/input/tablet/wacom_wac.h | 5 +++++ 3 files changed, 44 insertions(+), 3 deletions(-)
drivers/input/tablet/wacom_sys.c +12 -0
@@ -1197,6 +1197,8 @@ static void wacom_wireless_work(struct w wacom_wac1->features.device_type =BTN_TOOL_PEN ;snprintf (wacom_wac1->name,WACOM_NAME_MAX ,"%s (WL) Pen" , wacom_wac1->features.name); + wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max; + wacom_wac1->shared->type = wacom_wac1->features.type; error =wacom_register_input (wacom1);if (error) goto fail;
@@ -1218,6 +1220,10 @@ static void wacom_wireless_work(struct w error =wacom_register_input (wacom2);if (error) goto fail; + +if (wacom_wac1->features.type ==INTUOSHT && + wacom_wac1->features.touch_max) + wacom_wac->shared->touch_input = wacom_wac2->input; } error =wacom_initialize_battery (wacom);
@@ -1396,6 +1402,12 @@ static int wacom_probe(struct usb_interf goto fail5; } } + +if (wacom_wac->features.type ==INTUOSHT && wacom_wac->features.touch_max) { +if (wacom_wac->features.device_type ==BTN_TOOL_FINGER ) + wacom_wac->shared->touch_input = wacom_wac->input; + } +return 0 ; fail5:wacom_destroy_leds (wacom);
drivers/input/tablet/wacom_wac.c +27 -3
@@ -1219,13 +1219,23 @@ static int wacom_bpt3_touch(struct wacomstatic int wacom_bpt_pen (struct wacom_wac *wacom) { +struct wacom_features *features = &wacom->features;struct input_dev *input = wacom->input;unsigned char *data = wacom->data;int prox =0 , x =0 , y =0 , p =0 , d =0 , pen =0 , btn1 =0 , btn2 =0 ; -if (data[0 ] !=WACOM_REPORT_PENABLED ) +if (data[0 ] !=WACOM_REPORT_PENABLED && data[0 ] !=WACOM_REPORT_USB )return 0 ; +if (data[0 ] ==WACOM_REPORT_USB ) { +if (features->type ==INTUOSHT && features->touch_max) { +input_report_switch (wacom->shared->touch_input, +SW_MUTE_DEVICE , data[8 ] &0x40 ); +input_sync (wacom->shared->touch_input); + } +return 0 ; + } + prox = (data[1 ] &0x20 ) ==0x20 ;/*
@@ -1258,8 +1268,8 @@ static int wacom_bpt_pen(struct wacom_wa* touching and applying pressure; do not report negative * distance. */ -if (data[8 ] <= wacom->features.distance_max) - d = wacom->features.distance_max - data[8 ]; +if (data[8 ] <= features->distance_max) + d = features->distance_max - data[8 ]; pen = data[1 ] &0x01 ; btn1 = data[1 ] &0x02 ;
@@ -1310,6 +1320,13 @@ static int wacom_wireless_irq(struct wacif (connected) {int pid, battery; +if ((wacom->shared->type ==INTUOSHT ) && + wacom->shared->touch_max) { +input_report_switch (wacom->shared->touch_input, +SW_MUTE_DEVICE , data[5 ] &0x40 ); +input_sync (wacom->shared->touch_input); + } + pid =get_unaligned_be16 (&data[6 ]); battery = data[5 ] &0x3f ;if (wacom->pid != pid) {
@@ -1779,6 +1796,13 @@ int wacom_setup_input_capabilities(strucbreak ;case INTUOSHT : +if (features->touch_max && + features->device_type ==BTN_TOOL_FINGER ) { + input_dev->evbit[0 ] |=BIT_MASK (EV_SW ); +__set_bit (SW_MUTE_DEVICE , input_dev->swbit); + } +/* fall through */ +case BAMBOO_PT :__clear_bit (ABS_MISC , input_dev->absbit);
drivers/input/tablet/wacom_wac.h +5 -0
@@ -55,6 +55,7 @@#define WACOM_REPORT_TPC1FGE 18#define WACOM_REPORT_24HDT 1#define WACOM_REPORT_WL 128 +#define WACOM_REPORT_USB 192/* device quirks */ #define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -131,6 +132,10 @@ struct wacom_features {struct wacom_shared {bool stylus_in_proximity;bool touch_down; +/* for wireless device to access USB interfaces */ +unsigned touch_max; +int type; +struct input_dev *touch_input; };struct wacom_wac {
Greg Kroah-Hartman
maintainerPATCH 42/46 xhci: Fix resume issues on Renesas chips in Samsung laptops
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <[email protected]>
commit 1aa9578c1a9450fb21501c4f549f5b1edb557e6d upstream.
Don Zickus <[email protected]> writes:
Some co-workers of mine bought Samsung laptops that had mostly usb3 ports. Those ports did not resume correctly (the driver would timeout communicating and fail). This led to frustration as suspend/resume is a common use for laptops.
Poking around, I applied the reset on resume quirk to this chipset and the resume started working. Reloading the xhci_hcd module had been the temporary workaround.
--- drivers/usb/host/xhci-pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/host/xhci-pci.c +5 -0
@@ -142,6 +142,11 @@ static void xhci_pci_quirks(struct devic "QUIRK: Resetting on resume"); xhci->quirks |=XHCI_TRUST_TX_LENGTH ; } +if (pdev->vendor ==PCI_VENDOR_ID_RENESAS && + pdev->device ==0x0015 && + pdev->subsystem_vendor ==PCI_VENDOR_ID_SAMSUNG && + pdev->subsystem_device ==0xc0cd ) + xhci->quirks |=XHCI_RESET_ON_RESUME ;if (pdev->vendor ==PCI_VENDOR_ID_VIA ) xhci->quirks |=XHCI_RESET_ON_RESUME ; }
Greg Kroah-Hartman
maintainerPATCH 43/46 e100: Fix "disabling already-disabled device" warning
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michele Baldessari <[email protected]>
commit 2b6e0ca175fe4a20f21ba82b1e7ccc71029c4dd4 upstream.
In https://bugzilla.redhat.com/show_bug.cgi?id=994438 and
https://bugzilla.redhat.com/show_bug.cgi?id=970480 we received different reports of e100 throwing the following warning:
[<c06a0ba5>] ? pci_disable_device+0x85/0x90
[<c044a153>] warn_slowpath_fmt+0x33/0x40 [<c06a0ba5>] pci_disable_device+0x85/0x90 [<f7fdf7e0>] __e100_shutdown+0x80/0x120 [e100] [<c0476ca5>] ? check_preempt_curr+0x65/0x90 [<f7fdf8d6>] e100_suspend+0x16/0x30 [e100] [<c06a1ebb>] pci_legacy_suspend+0x2b/0xb0 [<c098fc0f>] ? wait_for_completion+0x1f/0xd0 [<c06a2d50>] ? pci_pm_poweroff+0xb0/0xb0 [<c06a2de4>] pci_pm_freeze+0x94/0xa0 [<c0767bb7>] dpm_run_callback+0x37/0x80 [<c076a204>] ? pm_wakeup_pending+0xc4/0x140 [<c0767f12>] __device_suspend+0xb2/0x1f0 [<c076806f>] async_suspend+0x1f/0x90 [<c04706e5>] async_run_entry_fn+0x35/0x140 [<c0478aef>] ? wake_up_process+0x1f/0x40 [<c0464495>] process_one_work+0x115/0x370 [<c0462645>] ? start_worker+0x25/0x30 [<c0464dc5>] ? manage_workers.isra.27+0x1a5/0x250 [<c0464f6e>] worker_thread+0xfe/0x330 [<c0464e70>] ? manage_workers.isra.27+0x250/0x250 [<c046a224>] kthread+0x94/0xa0 [<c0997f37>] ret_from_kernel_thread+0x1b/0x28 [<c046a190>] ? insert_kthread_work+0x30/0x30
This patch removes pci_disable_device() from __e100_shutdown(). pci_clear_master() is enough.
--- drivers/net/ethernet/intel/e100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e100.c +1 -1
@@ -3034,7 +3034,7 @@ static void __e100_shutdown(struct pci_d *enable_wake = false; } -pci_disable_device (pdev); +pci_clear_master (pdev); }static int __e100_power_off (struct pci_dev *pdev,bool wake)
Greg Kroah-Hartman
maintainerPATCH 44/46 libceph: rename ceph_msg::front_max to front_alloc_len
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit 3cea4c3071d4e55e9d7356efe9d0ebf92f0c2204 upstream.
Rename front_max field of struct ceph_msg to front_alloc_len to make its purpose more clear.
--- include/linux/ceph/messenger.h | 2 +- net/ceph/messenger.c | 6 +++--- net/ceph/mon_client.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
include/linux/ceph/messenger.h +1 -1
@@ -157,7 +157,7 @@ struct ceph_msg {bool front_is_vmalloc;bool more_to_follow;bool needs_out_seq; -int front_max; +int front_alloc_len;unsigned long ack_stamp;/* tx: when we were acked */ struct ceph_msgpool *pool;
net/ceph/messenger.c +3 -3
@@ -3126,7 +3126,7 @@ struct ceph_msg *ceph_msg_new(int type,INIT_LIST_HEAD (&m->data);/* front */ - m->front_max = front_len; + m->front_alloc_len = front_len;if (front_len) {if (front_len >PAGE_CACHE_SIZE ) { m->front.iov_base = __vmalloc(front_len, flags,
@@ -3301,8 +3301,8 @@ EXPORT_SYMBOL(ceph_msg_last_put);void ceph_msg_dump (struct ceph_msg *msg) { -pr_debug ("msg_dump %p (front_max %d length %zd)\n" , msg, - msg->front_max, msg->data_length); +pr_debug ("msg_dump %p (front_alloc_len %d length %zd)\n" , msg, + msg->front_alloc_len, msg->data_length);print_hex_dump (KERN_DEBUG ,"header: " ,DUMP_PREFIX_OFFSET ,16 ,1 , &msg->hdr,sizeof (msg->hdr), true);
net/ceph/mon_client.c +4 -4
@@ -152,7 +152,7 @@ static int __open_session(struct ceph_mo/* initiatiate authentication handshake */ ret =ceph_auth_build_hello (monc->auth, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);__send_prepared_auth_request (monc, ret); }else {dout ("open_session mon%d already open\n" , monc->cur_mon);
@@ -196,7 +196,7 @@ static void __send_subscribe(struct cephint num; p = msg->front.iov_base; - end = p + msg->front_max; + end = p + msg->front_alloc_len; num =1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;ceph_encode_32 (&p, num);
@@ -897,7 +897,7 @@ static void handle_auth_reply(struct cep ret =ceph_handle_auth_reply (monc->auth, msg->front.iov_base, msg->front.iov_len, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);if (ret <0 ) { monc->client->auth_err = ret;wake_up_all (&monc->client->auth_wq);
@@ -939,7 +939,7 @@ static int __validate_auth(struct ceph_mreturn 0 ; ret =ceph_build_auth (monc->auth, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);if (ret <=0 )return ret;/* either an error, or no need to authenticate */ __send_prepared_auth_request (monc, ret);
Greg Kroah-Hartman
maintainerPATCH 45/46 libceph: rename front to front_len in get_reply()
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit 3f0a4ac55fe036902e3666be740da63528ad8639 upstream.
Rename front local variable to front_len in get_reply() to make its purpose more clear.
--- net/ceph/osd_client.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
net/ceph/osd_client.c +5 -4
@@ -2495,7 +2495,7 @@ static struct ceph_msg *get_reply(structstruct ceph_osd_client *osdc = osd->o_osdc;struct ceph_msg *m;struct ceph_osd_request *req; -int front =le32_to_cpu (hdr->front_len); +int front_len =le32_to_cpu (hdr->front_len);int data_len =le32_to_cpu (hdr->data_len);u64 tid;
@@ -2515,12 +2515,13 @@ static struct ceph_msg *get_reply(struct req->r_reply, req->r_reply->con);ceph_msg_revoke_incoming (req->r_reply); -if (front > req->r_reply->front.iov_len) { +if (front_len > req->r_reply->front.iov_len) {pr_warning ("get_reply front %d > preallocated %d (%u#%llu)\n" , - front, (int )req->r_reply->front.iov_len, + front_len, (int )req->r_reply->front.iov_len, (unsigned int )con->peer_name.type,le64_to_cpu (con->peer_name.num)); - m =ceph_msg_new (CEPH_MSG_OSD_OPREPLY , front,GFP_NOFS , false); + m =ceph_msg_new (CEPH_MSG_OSD_OPREPLY , front_len,GFP_NOFS , + false);if (!m) goto out;ceph_msg_put (req->r_reply);
Greg Kroah-Hartman
maintainerPATCH 46/46 libceph: fix preallocation check in get_reply()
In reply to Greg Kroah-Hartman3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit f2be82b0058e90b5d9ac2cb896b4914276fb50ef upstream.
The check that makes sure that we have enough memory allocated to read in the entire header of the message in question is currently busted. It compares front_len of the incoming message with iov_len field of ceph_msg::front structure, which is used primarily to indicate the amount of data already read in, and not the size of the allocated buffer. Under certain conditions (e.g. a short read from a socket followed by that socket's shutdown and owning ceph_connection reset) this results in a warning similar to
[85688.975866] libceph: get_reply front 198 > preallocated 122 (4#0)
and, through another bug, leads to forever hung tasks and forced reboots. Fix this by comparing front_len with front_alloc_len field of struct ceph_msg, which stores the actual size of the buffer.
--- net/ceph/messenger.c | 3 +-- net/ceph/osd_client.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-)
net/ceph/messenger.c +1 -2
@@ -3126,7 +3126,6 @@ struct ceph_msg *ceph_msg_new(int type,INIT_LIST_HEAD (&m->data);/* front */ - m->front_alloc_len = front_len;if (front_len) {if (front_len >PAGE_CACHE_SIZE ) { m->front.iov_base = __vmalloc(front_len, flags,
@@ -3143,7 +3142,7 @@ struct ceph_msg *ceph_msg_new(int type, }else { m->front.iov_base =NULL ; } - m->front.iov_len = front_len; + m->front_alloc_len = m->front.iov_len = front_len;dout ("ceph_msg_new %p front %d\n" , m, front_len);return m;
net/ceph/osd_client.c +2 -2
@@ -2515,9 +2515,9 @@ static struct ceph_msg *get_reply(struct req->r_reply, req->r_reply->con);ceph_msg_revoke_incoming (req->r_reply); -if (front_len > req->r_reply->front.iov_len) { +if (front_len > req->r_reply->front_alloc_len) {pr_warning ("get_reply front %d > preallocated %d (%u#%llu)\n" , - front_len, (int )req->r_reply->front.iov_len, + front_len, req->r_reply->front_alloc_len, (unsigned int )con->peer_name.type,le64_to_cpu (con->peer_name.num)); m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
Build results:
total: 126 pass: 120 skipped: 4 fail: 2
qemu tests all passed.
Builds powerpc:mpc85xx_defconfig and powerpc:mpc85xx_smp_defconfig are still failing. Upstream (-rc8) still has the same problem. Results are therefore as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
Greg Kroah-Hartman
maintainerQuoted 13 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
Build results:
total: 126 pass: 120 skipped: 4 fail: 2
Quoted 7 lines
qemu tests all passed.
Builds powerpc:mpc85xx_defconfig and powerpc:mpc85xx_smp_defconfig are still failing. Upstream (-rc8) still has the same problem. Results are therefore as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Wonderful, thanks for testing all 3 of these releases and letting me know.
greg k-h
At Fri, 28 Mar 2014 18:12:12 -0700,
Quoted 16 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
Build results:
total: 126 pass: 120 skipped: 4 fail: 2qemu tests all passed.
Quoted 7 lines
Builds powerpc:mpc85xx_defconfig and powerpc:mpc85xx_smp_defconfig are still failing. Upstream (-rc8) still has the same problem. Results are therefore as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
3.4.85-rc1, 3.10.35-rc1, and 3.13.8-rc1 passed my test.
- Test Cases:
- Build this kernel.
- Boot this kernel.
- Build the latest mainline kernel with this kernel.
- Test Tool:
https://github.com/satoru-takeuchi/test-linux-stable
- Test Result (kernel .config, ktest config and test log):
http://satoru-takeuchi.org/test-linux-stable/results/<version>-<test datetime>.tar.xz
- Build Environment:
- OS: Debian Jessy x86_64
- CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz x 4
- memory: 8GB
- Test Target Environment:
- Debian Jessy x86_64 (KVM guest on the Build Environment)
- # of vCPU: 2
- memory: 2GB
Thanks,
Satoru
Greg Kroah-Hartman
maintainerQuoted 44 lines · Satoru Takeuchi
At Fri, 28 Mar 2014 18:12:12 -0700,
Quoted 16 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
Build results:
total: 126 pass: 120 skipped: 4 fail: 2qemu tests all passed.
Quoted 7 lines
Builds powerpc:mpc85xx_defconfig and powerpc:mpc85xx_smp_defconfig are still failing. Upstream (-rc8) still has the same problem. Results are therefore as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
3.4.85-rc1, 3.10.35-rc1, and 3.13.8-rc1 passed my test.
- Test Cases:
- Build this kernel.
- Boot this kernel.
- Build the latest mainline kernel with this kernel.- Test Tool:
https://github.com/satoru-takeuchi/test-linux-stable- Test Result (kernel .config, ktest config and test log):
http://satoru-takeuchi.org/test-linux-stable/results/<version>-<test datetime>.tar.xz- Build Environment:
- OS: Debian Jessyx86_64
- CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz x 4
- memory: 8GB
Quoted 4 lines
- Test Target Environment:
- Debian Jessyx86_64(KVM guest on the Build Environment)
- # of vCPU: 2
- memory: 2GB
That's great, thanks for testing.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.13.8-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Compiled, and booted on my test systems. No regressions in dmesg.
-- Shuah
Signature · 4 lines
Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) [email protected] | (970) 672-0658
Greg Kroah-Hartman
maintainerQuoted 13 lines · Shuah Khan
Quoted 12 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.13.8 release. There are 46 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Mar 30 17:31:14 UTC 2014. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.13.8-rc1.gzand the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled, and booted on my test systems. No regressions in dmesg.
Thanks for testing all 3 of these and letting me know.
greg k-h