3.12.53-stable review
cover 3.12.53-stable review
This is the start of the stable review cycle for the 3.12.53 release. There are 39 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 Wed Jan 27 12:44:04 CET 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.53-rc1.xz
and the diffstat can be found below.
thanks,
js
===============
Adrien Vergé (1):
USB: quirks: Fix another ELAN touchscreen
Alexandra Yates (1):
ALSA: hda - Add Intel Lewisburg device IDs Audio
Ben Hutchings (2):
isdn_ppp: Add checks for allocation failure in isdn_ppp_open() ppp, slip: Validate VJ compression slot parameters completely
Bjorn Helgaas (1):
PCI: Drop "setting latency timer" messages
Boris Ostrovsky (1):
xen/gntdev: Grant maps should not be subject to NUMA balancing
Chris Wilson (1):
drm/i915: Fix SRC_COPY width on 830/845g
Corey Minyard (1):
ring-buffer: Always run per-cpu ring buffer resize with
schedule_work_on()
David Howells (1):
KEYS: Fix race between read and revoke
Ditang Chen (1):
SUNRPC: Fix oops when trace sunrpc_task events in nfs client
Dmitry V. Levin (1):
x86/signal: Fix restart_syscall number for x32 tasks
Eric Dumazet (1):
udp: properly support MSG_PEEK with truncated buffers
Eric Ren (1):
dlm: make posix locks interruptible
Finn Thain (1):
m68k/mac: Make SCC reset work more reliably
Geert Uytterhoeven (1):
m68k/mm: Check for mm != NULL in do_page_fault() debug code
H.J. Lu (1):
x86/boot: Double BOOT_HEAP_SIZE to 64KB
Hannes Reinecke (1):
block: Always check queue limits for cloned requests
Herbert Xu (1):
route: Use ipv4_mtu instead of raw rt_pmtu
Ingo Molnar (1):
efi: Disable interrupts around EFI calls, not in the epilog/prolog
calls
James Smart (1):
lpfc: Fix null ndlp dereference in target_reset_handler
Jan Stancek (1):
ipmi: move timer init to before irq is setup
Kamal Mostafa (1):
tools: Add a "make all" rule
Karl Heiss (1):
sctp: Prevent soft lockup when sctp_accept() is called during a
timeout event
Kirill A. Shutemov (2):
m32r: fix potential NULL-pointer dereference
m68k: handle pgtable_page_ctor() fail
Li Wei (1):
ipv4: Don't increase PMTU with Datagram Too Big message.
Mario Kleiner (1):
x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
Ouyang Zhaowei (Charles) (1):
x86/xen: don't reset vcpu_info on a cancelled suspend
Paul Mackerras (1):
KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR
Rusty Russell (1):
module: remove MODULE_GENERIC_TABLE
Salva Peiró (1):
staging/dgnc: fix info leak in ioctl
Saurav Kashyap (1):
qla2xxx: Fix hardware lock/unlock issue causing kernel panic.
Scott Jiang (1):
pm: use GFP_ATOMIC when pm core call this function
Takashi Iwai (2):
ALSA: hda - Fix noise problems on Thinkpad T440s
ALSA: hda - Apply pin fixup for HP ProBook 6550b
Vineet Gupta (2):
MAINTAINERS: Add public mailing list for ARC
ARC: Fix silly typo in MAINTAINERS file commit
30b9dbee895ff0d5cbf155bd1ef3f0f5992bca6f upstream.
Vladis Dronov (1):
Input: aiptek - fix crash on detecting device without endpoints
Yevgeny Pats (1):
KEYS: Fix keyring ref leak in join_session_keyring()
MAINTAINERS | 1 + arch/blackfin/mach-common/pm.c | 2 +- arch/m32r/include/asm/pgalloc.h | 2 ++ arch/m68k/include/asm/mcf_pgalloc.h | 4 +++ arch/m68k/include/asm/motorola_pgalloc.h | 8 ++++-- arch/m68k/include/asm/sun3_pgalloc.h | 5 +++- arch/m68k/kernel/head.S | 4 ++- arch/m68k/mm/fault.c | 3 +-- arch/powerpc/kvm/book3s_hv.c | 6 +++++ arch/x86/include/asm/boot.h | 2 +- arch/x86/kernel/reboot.c | 8 ++++++ arch/x86/kernel/signal.c | 17 +++++++------ arch/x86/platform/efi/efi.c | 7 ++++++ arch/x86/platform/efi/efi_32.c | 11 +++------ arch/x86/platform/efi/efi_64.c | 3 --- arch/x86/xen/suspend.c | 3 ++- block/blk-core.c | 21 ++++++---------- drivers/char/ipmi/ipmi_si_intf.c | 8 +++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/input/tablet/aiptek.c | 9 +++++++ drivers/isdn/i4l/isdn_ppp.c | 12 ++++++--- drivers/net/ppp/ppp_generic.c | 6 ++--- drivers/net/slip/slhc.c | 12 ++++++--- drivers/net/slip/slip.c | 2 +- drivers/pci/pci.c | 2 +- drivers/scsi/lpfc/lpfc_scsi.c | 10 +++++++- drivers/scsi/qla2xxx/qla_init.c | 4 +++ drivers/scsi/qla2xxx/qla_target.c | 5 ---- drivers/staging/dgnc/dgnc_mgmt.c | 1 + drivers/usb/core/quirks.c | 3 +++ drivers/xen/gntdev.c | 2 +- fs/dlm/plock.c | 2 +- include/linux/blkdev.h | 1 - include/linux/isapnp.h | 4 --- include/linux/module.h | 19 ++++++--------- include/trace/events/sunrpc.h | 4 +-- kernel/trace/ring_buffer.c | 24 +++--------------- net/ipv4/route.c | 2 +- net/ipv4/udp.c | 6 +++-- net/ipv6/udp.c | 6 +++-- net/sctp/sm_sideeffect.c | 42 +++++++++++++++++--------------- security/keys/keyctl.c | 18 +++++++------- security/keys/process_keys.c | 1 + sound/pci/hda/hda_intel.c | 5 ++++ sound/pci/hda/patch_realtek.c | 22 ++++++++++++++++- sound/pci/hda/patch_sigmatel.c | 1 + tools/Makefile | 8 ++++++ 47 files changed, 210 insertions(+), 140 deletions(-)
Signature · 1 line
2.7.0
PATCH 1/39 efi: Disable interrupts around EFI calls, not in the epilog/prolog calls
From: Ingo Molnar <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 23a0d4e8fa6d3a1d7fb819f79bcc0a3739c30ba9 upstream.
Tapasweni Pathak reported that we do a kmalloc() in efi_call_phys_prolog() on x86-64 while having interrupts disabled, which is a big no-no, as kmalloc() can sleep.
Solve this by removing the irq disabling from the prolog/epilog calls around EFI calls: it's unnecessary, as in this stage we are single threaded in the boot thread, and we don't ever execute this from interrupt contexts.
--- arch/x86/platform/efi/efi.c | 7 +++++++ arch/x86/platform/efi/efi_32.c | 11 +++-------- arch/x86/platform/efi/efi_64.c | 3 --- 3 files changed, 10 insertions(+), 11 deletions(-)
arch/x86/platform/efi/efi.c +7 -0
@@ -250,12 +250,19 @@ static efi_status_t __init phys_efi_set_virtual_address_map( efi_memory_desc_t *virtual_map) {efi_status_t status; +unsigned long flags;efi_call_phys_prelog (); + +/* Disable interrupts around EFI calls: */ +local_irq_save (flags); status =efi_call_phys4 (efi_phys.set_virtual_address_map, memory_map_size, descriptor_size, descriptor_version, virtual_map); +local_irq_restore (flags); +efi_call_phys_epilog (); +return status; }
arch/x86/platform/efi/efi_32.c +3 -8
@@ -33,19 +33,16 @@/* * To make EFI call EFI runtime service in physical addressing mode we need -* prelog/epilog before/after the invocation to disable interrupt, to -* claim EFI runtime service handler exclusively and to duplicate a memory in -* low memory space say 0 - 3G. +* prolog/epilog before/after the invocation to claim the EFI runtime service +* handler exclusively and to duplicate a memory mapping in low memory space, +* say 0 - 3G. */ -static unsigned long efi_rt_eflags;void efi_call_phys_prelog (void ) {struct desc_ptr gdt_descr; -local_irq_save (efi_rt_eflags); -load_cr3 (initial_page_table);__flush_tlb_all ();
@@ -64,6 +61,4 @@ void efi_call_phys_epilog(void)load_cr3 (swapper_pg_dir);__flush_tlb_all (); - -local_irq_restore (efi_rt_eflags); }
arch/x86/platform/efi/efi_64.c +0 -3
@@ -40,7 +40,6 @@#include <asm/fixmap.h> static pgd_t *save_pgd__initdata ; -static unsigned long efi_flags__initdata ;static void __init early_code_mapping_set_exec (int executable) {
@@ -66,7 +65,6 @@ void __init efi_call_phys_prelog(void)int n_pgds;early_code_mapping_set_exec (1 ); -local_irq_save (efi_flags); n_pgds =DIV_ROUND_UP ((max_pfn <<PAGE_SHIFT ),PGDIR_SIZE ); save_pgd =kmalloc (n_pgds *sizeof (pgd_t),GFP_KERNEL );
@@ -90,7 +88,6 @@ void __init efi_call_phys_epilog(void)set_pgd (pgd_offset_k (pgd *PGDIR_SIZE ), save_pgd[pgd]);kfree (save_pgd);__flush_tlb_all (); -local_irq_restore (efi_flags);early_code_mapping_set_exec (0 ); }
Signature · 1 line
2.7.0
PATCH 2/39 tools: Add a "make all" rule
From: Kamal Mostafa <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit f6ba98c5dc78708cb7fd29950c4a50c4c7e88f95 upstream.
--- tools/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/Makefile +8 -0
@@ -22,6 +22,10 @@ help: @echo ' from the kernel command line to build and install one of' @echo ' the tools above' @echo '' + @echo ' $$ make tools/all' + @echo '' + @echo ' builds all tools.' + @echo '' @echo ' $$ make tools/install' @echo '' @echo ' installs all tools.'
@@ -50,6 +54,10 @@ selftests: FORCE turbostat x86_energy_perf_policy: FORCE $(call descend,power/x86/$@) +all: cgroup cpupower firewire lguest \ + perf selftests turbostat usb \ + virtio vm net x86_energy_perf_policy + cpupower_install: $(call descend,power/$(@:_install=),install)
Signature · 1 line
2.7.0
PATCH 3/39 ALSA: hda - Fix noise problems on Thinkpad T440s
In reply to Jiri SlabyFrom: Takashi Iwai <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 9a811230481243f384b8036c6a558bfdbd961f78 upstream.
Lenovo Thinkpad T440s suffers from constant background noises, and it seems to be a generic hardware issue on this model:
https://forums.lenovo.com/t5/ThinkPad-T400-T500-and-newer-T/T440s-speaker-noise/td-p/1339883
As the noise comes from the analog loopback path, disabling the path is the easy workaround.
Also, the machine gives significant cracking noises at PM suspend. A workaround found by trial-and-error is to disable the shutup callback currently used for ALC269-variant.
This patch addresses these noise issues by introducing a new fixup chain. Although the same workaround might be applicable to other Thinkpad models, it's applied only to T440s (17aa:220c) in this patch, so far, just to be safe (you chicken!). As a compromise, a new model option string "tp440" is provided now, though, so that owners of other Thinkpad models can test it more easily.
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=958504
--- sound/pci/hda/patch_realtek.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +21 -1
@@ -3637,6 +3637,18 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, } } +/* additional fixup for Thinkpad T440s noise problem */ +static void alc_fixup_tpt440 (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->shutup = alc_no_shutup;/* reduce click noise */ + spec->gen.mixer_nid =0 ;/* reduce background noise */ + } +} +/* mute tablet speaker pin (0x14) via dock plugging in addition */ static void asus_tx300_automute (struct hda_codec *codec) {
@@ -3746,6 +3758,7 @@ enum {ALC283_FIXUP_INT_MIC ,ALC290_FIXUP_MONO_SPEAKERS ,ALC292_FIXUP_TPT440_DOCK , + ALC292_FIXUP_TPT440, }; static const struct hda_fixup alc269_fixups[] = {
@@ -4090,6 +4103,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC292_FIXUP_TPT440] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_tpt440, + .chained = true, + .chain_id = ALC292_FIXUP_TPT440_DOCK, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4185,7 +4204,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x21fb ,"Thinkpad T430s" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x2203 ,"Thinkpad X230 Tablet" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x2208 ,"Thinkpad T431s" ,ALC269_FIXUP_LENOVO_DOCK ), -SND_PCI_QUIRK (0x17aa ,0x220c ,"Thinkpad T440s" ,ALC292_FIXUP_TPT440_DOCK ), +SND_PCI_QUIRK (0x17aa ,0x220c ,"Thinkpad T440s" ,ALC292_FIXUP_TPT440 ),SND_PCI_QUIRK (0x17aa ,0x220e ,"Thinkpad T440p" ,ALC292_FIXUP_TPT440_DOCK ),SND_PCI_QUIRK (0x17aa ,0x2212 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
@@ -4263,6 +4282,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, + {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, {} };
Signature · 1 line
2.7.0
PATCH 4/39 dlm: make posix locks interruptible
In reply to Jiri SlabyFrom: Eric Ren <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit a6b1533e9a57d76cd3d9b7649d29ac604b1874b8 upstream.
Replace wait_event_killable with wait_event_interruptible so that a program waiting for a posix lock can be interrupted by a signal. With the killable version, a program was not interruptible by a signal if it had a signal handler set for it, overriding the default action of terminating the process.
--- fs/dlm/plock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/dlm/plock.c +1 -1
@@ -145,7 +145,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,send_op (op);if (xop->callback ==NULL ) { - rv =wait_event_killable (recv_wq, (op->done !=0 )); + rv =wait_event_interruptible (recv_wq, (op->done !=0 ));if (rv == -ERESTARTSYS ) {log_debug (ls,"dlm_posix_lock: wait killed %llx" , (unsigned long long )number);
Signature · 1 line
2.7.0
PATCH 5/39 PCI: Drop "setting latency timer" messages
In reply to Jiri SlabyFrom: Bjorn Helgaas <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit a006482b67a96c16dfefc558e36863c51e1829bf upstream.
This message isn't useful any more, so drop it.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=60636
Reference: http://lkml.kernel.org/r/CALCETrWkr53ZjqdN3t7rTTfr=+ZKZXJoYsuBcwPf0kN_33GfAw@mail.gmail.com
--- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci.c +1 -1
@@ -2871,7 +2871,7 @@ void __weak pcibios_set_master(struct pci_dev *dev) lat = pcibios_max_latency; else return; -dev_printk (KERN_DEBUG , &dev->dev,"setting latency timer to %d\n" , lat); +pci_write_config_byte (dev,PCI_LATENCY_TIMER , lat); }
Signature · 1 line
2.7.0
PATCH 6/39 ipv4: Don't increase PMTU with Datagram Too Big message.
In reply to Jiri SlabyFrom: Li Wei <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 upstream.
RFC 1191 said, "a host MUST not increase its estimate of the Path MTU in response to the contents of a Datagram Too Big message."
--- net/ipv4/route.c | 3 +++ 1 file changed, 3 insertions(+)
net/ipv4/route.c +3 -0
@@ -988,6 +988,9 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)if (dst->dev->mtu < mtu)return ; +if (rt->rt_pmtu && rt->rt_pmtu < mtu) +return ; +if (mtu < ip_rt_min_pmtu) mtu = ip_rt_min_pmtu;
Signature · 1 line
2.7.0
PATCH 7/39 route: Use ipv4_mtu instead of raw rt_pmtu
In reply to Jiri SlabyFrom: Herbert Xu <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit cb6ccf09d6b94bec4def1ac5cf4678d12b216474 upstream.
The commit 3cdaa5be9e81a914e633a6be7b7d2ef75b528562 ("ipv4: Don't increase PMTU with Datagram Too Big message") broke PMTU in cases where the rt_pmtu value has expired but is smaller than the new PMTU value.
This obsolete rt_pmtu then prevents the new PMTU value from being installed.
--- net/ipv4/route.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
net/ipv4/route.c +1 -4
@@ -985,10 +985,7 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)if (dst_metric_locked (dst,RTAX_MTU ))return ; -if (dst->dev->mtu < mtu) -return ; - -if (rt->rt_pmtu && rt->rt_pmtu < mtu) +if (ipv4_mtu (dst) < mtu)return ;if (mtu < ip_rt_min_pmtu)
Signature · 1 line
2.7.0
PATCH 8/39 SUNRPC: Fix oops when trace sunrpc_task events in nfs client
In reply to Jiri SlabyFrom: Ditang Chen <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 2ca310fc4160ed0420da65534a21ae77b24326a8 upstream.
When tracking sunrpc_task events in nfs client, the clnt pointer may be NULL.
[ 139.269266] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 [ 139.269915] IP: [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc] [ 139.269915] PGD 1d293067 PUD 1d294067 PMD 0 [ 139.269915] Oops: 0000 [#1] SMP [ 139.269915] Modules linked in: nfsv4 dns_resolver nfs lockd sunrpc fscache sg ppdev e1000 serio_raw pcspkr parport_pc parport i2c_piix4 i2c_core microcode xfs libcrc32c sd_mod sr_mod cdrom ata_generic crc_t10dif crct10dif_common pata_acpi ahci libahci ata_piix libata dm_mirror dm_region_hash dm_log dm_mod [ 139.269915] CPU: 0 PID: 59 Comm: kworker/0:2 Not tainted 3.10.0-84.el7.x86_64 #1 [ 139.269915] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 139.269915] Workqueue: rpciod rpc_async_schedule [sunrpc] [ 139.269915] task: ffff88001b598000 ti: ffff88001b632000 task.ti: ffff88001b632000 [ 139.269915] RIP: 0010:[<ffffffffa026f216>] [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc] [ 139.269915] RSP: 0018:ffff88001b633d70 EFLAGS: 00010206 [ 139.269915] RAX: ffff88001dfc5338 RBX: ffff88001cc37a00 RCX: ffff88001dfc5334 [ 139.269915] RDX: ffff88001dfc5338 RSI: 0000000000000000 RDI: ffff88001dfc533c [ 139.269915] RBP: ffff88001b633db0 R08: 000000000000002c R09: 000000000000000a [ 139.269915] R10: 0000000000062180 R11: 00000020759fb9dc R12: ffffffffa0292c20 [ 139.269915] R13: ffff88001dfc5334 R14: 0000000000000000 R15: 0000000000000000 [ 139.269915] FS: 0000000000000000(0000) GS:ffff88001fc00000(0000) knlGS:0000000000000000 [ 139.269915] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 139.269915] CR2: 0000000000000004 CR3: 000000001d290000 CR4: 00000000000006f0 [ 139.269915] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 139.269915] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 139.269915] Stack: [ 139.269915] 000000001b633d98 0000000000000246 ffff88001df1dc00 ffff88001cc37a00 [ 139.269915] ffff88001bc35e60 0000000000000000 ffff88001ffa0a48 ffff88001bc35ee0 [ 139.269915] ffff88001b633e08 ffffffffa02704b5 0000000000010000 ffff88001cc37a70 [ 139.269915] Call Trace: [ 139.269915] [<ffffffffa02704b5>] __rpc_execute+0x1d5/0x400 [sunrpc] [ 139.269915] [<ffffffffa0270706>] rpc_async_schedule+0x26/0x30 [sunrpc] [ 139.269915] [<ffffffff8107867b>] process_one_work+0x17b/0x460 [ 139.269915] [<ffffffff8107942b>] worker_thread+0x11b/0x400 [ 139.269915] [<ffffffff81079310>] ? rescuer_thread+0x3e0/0x3e0 [ 139.269915] [<ffffffff8107fc80>] kthread+0xc0/0xd0 [ 139.269915] [<ffffffff8107fbc0>] ? kthread_create_on_node+0x110/0x110 [ 139.269915] [<ffffffff815d122c>] ret_from_fork+0x7c/0xb0 [ 139.269915] [<ffffffff8107fbc0>] ? kthread_create_on_node+0x110/0x110 [ 139.269915] Code: 4c 8b 45 c8 48 8d 7d d0 89 4d c4 41 89 c9 b9 28 00 00 00 e8 9d b4 e9 e0 48 85 c0 49 89 c5 74 a2 48 89 c7 e8 9d 3f e9 e0 48 89 c2 <41> 8b 46 04 48 8b 7d d0 4c 89 e9 4c 89 e6 89 42 0c 0f b7 83 d4 [ 139.269915] RIP [<ffffffffa026f216>] ftrace_raw_event_rpc_task_running+0x86/0xf0 [sunrpc] [ 139.269915] RSP <ffff88001b633d70> [ 139.269915] CR2: 0000000000000004 [ 140.946406] ---[ end trace ba486328b98d7622 ]---
--- include/trace/events/sunrpc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/trace/events/sunrpc.h +2 -2
@@ -83,7 +83,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, ), TP_fast_assign( - __entry->client_id = clnt->cl_clid; + __entry->client_id = clnt ? clnt->cl_clid : -1; __entry->task_id = task->tk_pid; __entry->action = action; __entry->runstate = task->tk_runstate;
@@ -91,7 +91,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, __entry->flags = task->tk_flags; ), - TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf", + TP_printk("task:%u@%d flags=%4.4x state=%4.4lx status=%d action=%pf", __entry->task_id, __entry->client_id, __entry->flags, __entry->runstate,
Signature · 1 line
2.7.0
PATCH 9/39 ring-buffer: Always run per-cpu ring buffer resize with schedule_work_on()
In reply to Jiri SlabyFrom: Corey Minyard <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 021c5b34452d52e51664f09b98cd50c5495e74b6 upstream.
The code for resizing the trace ring buffers has to run the per-cpu resize on the CPU itself. The code was using preempt_off() and running the code for the current CPU directly, otherwise calling schedule_work_on().
At least on RT this could result in the following:
|BUG: sleeping function called from invalid context at kernel/rtmutex.c:673 |in_atomic(): 1, irqs_disabled(): 0, pid: 607, name: bash |3 locks held by bash/607: |CPU: 0 PID: 607 Comm: bash Not tainted 3.12.15-rt25+ #124 |(rt_spin_lock+0x28/0x68) |(free_hot_cold_page+0x84/0x3b8) |(free_buffer_page+0x14/0x20) |(rb_update_pages+0x280/0x338) |(ring_buffer_resize+0x32c/0x3dc) |(free_snapshot+0x18/0x38) |(tracing_set_tracer+0x27c/0x2ac)
probably via
|cd /sys/kernel/debug/tracing/ |echo 1 > events/enable ; sleep 2 |echo 1024 > buffer_size_kb
If we just always use schedule_work_on(), there's no need for the preempt_off(). So do that.
--- kernel/trace/ring_buffer.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-)
kernel/trace/ring_buffer.c +4 -20
@@ -1700,22 +1700,14 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,if (!cpu_buffer->nr_pages_to_update)continue ; -/* The update must run on the CPU that is being updated. */ -preempt_disable (); -if (cpu ==smp_processor_id () || !cpu_online (cpu)) { +/* Can't run something on an offline CPU. */ +if (!cpu_online (cpu)) {rb_update_pages (cpu_buffer); cpu_buffer->nr_pages_to_update =0 ; }else { -/* -* Can not disable preemption for schedule_work_on() -* on PREEMPT_RT. -*/ -preempt_enable ();schedule_work_on (cpu, &cpu_buffer->update_pages_work); -preempt_disable (); } -preempt_enable (); }/* wait for all the updates to complete */
@@ -1753,22 +1745,14 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,get_online_cpus (); -preempt_disable (); -/* The update must run on the CPU that is being updated. */ -if (cpu_id ==smp_processor_id () || !cpu_online (cpu_id)) +/* Can't run something on an offline CPU. */ +if (!cpu_online (cpu_id))rb_update_pages (cpu_buffer);else { -/* -* Can not disable preemption for schedule_work_on() -* on PREEMPT_RT. -*/ -preempt_enable ();schedule_work_on (cpu_id, &cpu_buffer->update_pages_work);wait_for_completion (&cpu_buffer->update_done); -preempt_disable (); } -preempt_enable (); cpu_buffer->nr_pages_to_update =0 ;put_online_cpus ();
Signature · 1 line
2.7.0
PATCH 10/39 drm/i915: Fix SRC_COPY width on 830/845g
In reply to Jiri SlabyFrom: Chris Wilson <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 611a7a4fd8b5fb6b25ab1f8bdcde61800a7feacf upstream.
One small change I forgot to make in
commit c4d69da167fa967749aeb70bc0e94a457e5d00c1
Author: Chris Wilson <[email protected]> Date: Mon Sep 8 14:25:41 2014 +0100
drm/i915: Evict CS TLBs between batches
was to update the copy width for the compact BLT copy instruction.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
@@ -1125,7 +1125,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring,*/ intel_ring_emit (ring,SRC_COPY_BLT_CMD |BLT_WRITE_RGBA );intel_ring_emit (ring,BLT_DEPTH_32 |BLT_ROP_SRC_COPY |4096 ); -intel_ring_emit (ring,DIV_ROUND_UP (len,4096 ) <<16 |1024 ); +intel_ring_emit (ring,DIV_ROUND_UP (len,4096 ) <<16 |4096 );intel_ring_emit (ring, cs_offset);intel_ring_emit (ring,4096 );intel_ring_emit (ring, offset);
Signature · 1 line
2.7.0
PATCH 11/39 lpfc: Fix null ndlp dereference in target_reset_handler
In reply to Jiri SlabyFrom: James Smart <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 63e480fd2f598e9ad37f89e79c36834e7dd60ba0 upstream.
--- drivers/scsi/lpfc/lpfc_scsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_scsi.c +9 -1
@@ -5264,7 +5264,15 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)if (status ==FAILED ) {lpfc_printf_vlog (vport,KERN_ERR ,LOG_FCP ,"0722 Target Reset rport failure: rdata x%p\n" , rdata); -return FAILED ; +if (pnode) { +spin_lock_irq (shost->host_lock); + pnode->nlp_flag &= ~NLP_NPR_ADISC ; + pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE ; +spin_unlock_irq (shost->host_lock); + } +lpfc_reset_flush_io_context (vport, tgt_id, lun_id, +LPFC_CTX_TGT ); +return FAST_IO_FAIL ; } scsi_event.event_type =FC_REG_SCSI_EVENT ;
Signature · 1 line
2.7.0
PATCH 12/39 block: Always check queue limits for cloned requests
In reply to Jiri SlabyFrom: Hannes Reinecke <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit bf4e6b4e757488dee1b6a581f49c7ac34cd217f8 upstream.
When a cloned request is retried on other queues it always needs to be checked against the queue limits of that queue. Otherwise the calculations for nr_phys_segments might be wrong, leading to a crash in scsi_init_sgtable().
To clarify this the patch renames blk_rq_check_limits() to blk_cloned_rq_check_limits() and removes the symbol export, as the new function should only be used for cloned requests and never exported.
--- block/blk-core.c | 21 +++++++-------------- include/linux/blkdev.h | 1 - 2 files changed, 7 insertions(+), 15 deletions(-)
block/blk-core.c +7 -14
@@ -1893,7 +1893,8 @@ void submit_bio(int rw, struct bio *bio)EXPORT_SYMBOL (submit_bio);/** -* blk_rq_check_limits - Helper function to check a request for the queue limit +* blk_cloned_rq_check_limits - Helper function to check a cloned request +* for new the queue limits * @q: the queue * @rq: the request being checked *
@@ -1904,20 +1905,13 @@ EXPORT_SYMBOL(submit_bio);* after it is inserted to @q, it should be checked against @q before * the insertion using this generic function. * -* This function should also be useful for request stacking drivers -* in some cases below, so export this function. * Request stacking drivers like request-based dm may change the queue -* limits while requests are in the queue (e.g. dm's table swapping). -* Such request stacking drivers should check those requests agaist -* the new queue limits again when they dispatch those requests, -* although such checkings are also done against the old queue limits -* when submitting requests. +* limits when retrying requests on other queues. Those requests need +* to be checked against the new queue limits again during dispatch. */ -int blk_rq_check_limits (struct request_queue *q,struct request *rq) +static int blk_cloned_rq_check_limits (struct request_queue *q, +struct request *rq) { -if (!rq_mergeable (rq)) -return 0 ; -if (blk_rq_sectors (rq) >blk_queue_get_max_sectors (q, rq->cmd_flags)) {printk (KERN_ERR "%s: over max size limit.\n" , __func__);return -EIO ;
@@ -1937,7 +1931,6 @@ int blk_rq_check_limits(struct request_queue *q, struct request *rq)return 0 ; } -EXPORT_SYMBOL_GPL (blk_rq_check_limits);/** * blk_insert_cloned_request - Helper for stacking drivers to submit a request
@@ -1949,7 +1942,7 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq)unsigned long flags;int where =ELEVATOR_INSERT_BACK ; -if (blk_rq_check_limits (q, rq)) +if (blk_cloned_rq_check_limits (q, rq))return -EIO ; if (rq->rq_disk &&
include/linux/blkdev.h +0 -1
@@ -740,7 +740,6 @@ extern struct request *blk_make_request(struct request_queue *, struct bio *,extern void blk_requeue_request (struct request_queue *,struct request *);extern void blk_add_request_payload (struct request *rq,struct page *page,unsigned int len); -extern int blk_rq_check_limits (struct request_queue *q,struct request *rq);extern int blk_lld_busy (struct request_queue *q); extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, struct bio_set *bs, gfp_t gfp_mask,
Signature · 1 line
2.7.0
PATCH 13/39 Input: aiptek - fix crash on detecting device without endpoints
In reply to Jiri SlabyFrom: Vladis Dronov <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 8e20cf2bce122ce9262d6034ee5d5b76fbb92f96 upstream.
The aiptek driver crashes in aiptek_probe() when a specially crafted USB device without endpoints is detected. This fix adds a check that the device has proper configuration expected by the driver. Also an error return value is changed to more matching one in one of the error paths.
--- drivers/input/tablet/aiptek.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/input/tablet/aiptek.c +9 -0
@@ -1820,6 +1820,14 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)input_set_abs_params (inputdev,ABS_TILT_Y ,AIPTEK_TILT_MIN ,AIPTEK_TILT_MAX ,0 ,0 );input_set_abs_params (inputdev,ABS_WHEEL ,AIPTEK_WHEEL_MIN ,AIPTEK_WHEEL_MAX -1 ,0 ,0 ); +/* Verify that a device really has an endpoint */ +if (intf->altsetting[0 ].desc.bNumEndpoints <1 ) { +dev_err (&intf->dev, +"interface has %d endpoints, but must have minimum 1\n" , + intf->altsetting[0 ].desc.bNumEndpoints); + err = -EINVAL ; + goto fail3; + } endpoint = &intf->altsetting[0 ].endpoint[0 ].desc;/* Go set up our URB, which is called when the tablet receives
@@ -1862,6 +1870,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)if (i ==ARRAY_SIZE (speeds)) {dev_info (&intf->dev,"Aiptek tried all speeds, no sane response\n" ); + err = -EINVAL ; goto fail3; }
Signature · 1 line
2.7.0
PATCH 14/39 qla2xxx: Fix hardware lock/unlock issue causing kernel panic.
In reply to Jiri SlabyFrom: Saurav Kashyap <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit ba9f6f64a0ff6b7ecaed72144c179061f8eca378 upstream.
This patch fixes a kernel panic for qla2xxx Target core Module driver introduced by a fix in the qla2xxx initiator code.
Commit ef86cb2 ("qla2xxx: Mark port lost when we receive an RSCN for it.") introduced the regression for qla2xxx Target driver.
Stack trace will have following signature
--- <NMI exception stack> ---
[ffff88081faa3cc8] _raw_spin_lock_irqsave at ffffffff815b1f03 [ffff88081faa3cd0] qlt_fc_port_deleted at ffffffffa096ccd0 [qla2xxx] [ffff88081faa3d20] qla2x00_schedule_rport_del at ffffffffa0913831[qla2xxx] [ffff88081faa3d50] qla2x00_mark_device_lost at ffffffffa09159c5[qla2xxx] [ffff88081faa3db0] qla2x00_async_event at ffffffffa0938d59 [qla2xxx] [ffff88081faa3e30] qla24xx_msix_default at ffffffffa093a326 [qla2xxx] [ffff88081faa3e90] handle_irq_event_percpu at ffffffff810a7b8d [ffff88081faa3ee0] handle_irq_event at ffffffff810a7d32 [ffff88081faa3f10] handle_edge_irq at ffffffff810ab6b9 [ffff88081faa3f30] handle_irq at ffffffff8100619c [ffff88081faa3f70] do_IRQ at ffffffff815b4b1c
--- <IRQ stack> ---
--- drivers/scsi/qla2xxx/qla_init.c | 4 ++++ drivers/scsi/qla2xxx/qla_target.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +4 -0
@@ -2725,6 +2725,7 @@ qla2x00_rport_del(void *data)struct fc_rport *rport;scsi_qla_host_t *vha = fcport->vha;unsigned long flags; +unsigned long vha_flags;spin_lock_irqsave (fcport->vha->host->host_lock, flags); rport = fcport->drport ? fcport->drport: fcport->rport;
@@ -2736,7 +2737,9 @@ qla2x00_rport_del(void *data)* Release the target mode FC NEXUS in qla_target.c code * if target mod is enabled. */ +spin_lock_irqsave (&vha->hw->hardware_lock, vha_flags);qlt_fc_port_deleted (vha, fcport); +spin_unlock_irqrestore (&vha->hw->hardware_lock, vha_flags); } }
@@ -3106,6 +3109,7 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)* Create target mode FC NEXUS in qla_target.c if target mode is * enabled.. */ +qlt_fc_port_added (vha, fcport);spin_lock_irqsave (fcport->vha->host->host_lock, flags);
drivers/scsi/qla2xxx/qla_target.c +0 -5
@@ -741,7 +741,6 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport)struct qla_hw_data *ha = vha->hw;struct qla_tgt *tgt = ha->tgt.qla_tgt;struct qla_tgt_sess *sess; -unsigned long flags;if (!vha->hw->tgt.tgt_ops)return ;
@@ -749,14 +748,11 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport)if (!tgt || (fcport->port_type !=FCT_INITIATOR ))return ; -spin_lock_irqsave (&ha->hardware_lock, flags);if (tgt->tgt_stop) { -spin_unlock_irqrestore (&ha->hardware_lock, flags);return ; } sess =qlt_find_sess_by_port_name (tgt, fcport->port_name);if (!sess) { -spin_unlock_irqrestore (&ha->hardware_lock, flags);return ; }
@@ -764,7 +760,6 @@ void qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport) sess->local =1 ;qlt_schedule_sess_for_deletion (sess, false); -spin_unlock_irqrestore (&ha->hardware_lock, flags); }static inline int test_tgt_sess_count (struct qla_tgt *tgt)
Signature · 1 line
2.7.0
PATCH 15/39 module: remove MODULE_GENERIC_TABLE
In reply to Jiri SlabyFrom: Rusty Russell <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit cff26a51da5d206d3baf871e75778da44710219d upstream.
MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the work directly. This also removes a wart introduced in the last patch, where the alias is defined to be an unknown struct type "struct type##__##name##_device_id" instead of "struct type##_device_id" (it's an extern so GCC doesn't care, but it's wrong).
The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused, so delete it.
Bryan: gcc v3.3.2 cares
--- include/linux/isapnp.h | 4 ---- include/linux/module.h | 19 ++++++++----------- 2 files changed, 8 insertions(+), 15 deletions(-)
include/linux/isapnp.h +0 -4
@@ -56,10 +56,6 @@#define ISAPNP_DEVICE_ID (_va, _vb, _vc, _function) \ { .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) } -/* export used IDs outside module */ -#define ISAPNP_CARD_TABLE (name) \ - MODULE_GENERIC_TABLE(isapnp_card, name) -struct isapnp_card_id {unsigned long driver_data;/* data private to the driver */ unsigned short card_vendor, card_device;
include/linux/module.h +8 -11
@@ -83,15 +83,6 @@ void sort_extable(struct exception_table_entry *start,void sort_main_extable (void );void trim_init_extable (struct module *m); -#ifdef MODULE -#define MODULE_GENERIC_TABLE (gtype,name) \ -extern const struct gtype##_id __mod_##gtype##_table \ - __attribute__ ((unused, alias(__stringify(name)))) - -#else /* !MODULE */ -#define MODULE_GENERIC_TABLE (gtype,name) -#endif -/* Generic info of form tag = "info" */ #define MODULE_INFO (tag, info) __MODULE_INFO(tag, tag, info)
@@ -142,8 +133,14 @@ extern const struct gtype##_id __mod_##gtype##_table \/* What your module does. */ #define MODULE_DESCRIPTION (_description) MODULE_INFO(description, _description) -#define MODULE_DEVICE_TABLE (type,name) \ - MODULE_GENERIC_TABLE(type##__##name##_device, name) +#ifdef MODULE +/* Creates an alias so file2alias.c can find device table. */ +#define MODULE_DEVICE_TABLE (type, name) \ + extern const struct type##_device_id __mod_##type##__##name##_device_table \ + __attribute__ ((unused, alias(__stringify(name)))) +#else /* !MODULE */ +#define MODULE_DEVICE_TABLE (type, name) +#endif /* Version of form [<epoch>:]<version>[-<extra-version>]. Or for CVS/RCS ID version, everything but the number is stripped.
Signature · 1 line
2.7.0
PATCH 16/39 staging/dgnc: fix info leak in ioctl
In reply to Jiri SlabyFrom: Salva Peiró <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 4b6184336ebb5c8dc1eae7f7ab46ee608a748b05 upstream.
The dgnc_mgmt_ioctl() code fails to initialize the 16 _reserved bytes of struct digi_dinfo after the ->dinfo_nboards member. Add an explicit memset(0) before filling the structure to avoid the info leak.
--- drivers/staging/dgnc/dgnc_mgmt.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/dgnc/dgnc_mgmt.c +1 -0
@@ -145,6 +145,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)DGNC_LOCK (dgnc_global_lock, lock_flags); +memset (&ddi,0 ,sizeof (ddi)); ddi.dinfo_nboards = dgnc_NumBoards;sprintf (ddi.dinfo_version,"%s" ,DG_PART );
Signature · 1 line
2.7.0
PATCH 17/39 pm: use GFP_ATOMIC when pm core call this function
In reply to Jiri SlabyFrom: Scott Jiang <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit aefefe92116b776203f95f3249ae61b94f73f170 upstream.
We shouldn't sleep in atomic sections.
--- arch/blackfin/mach-common/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/blackfin/mach-common/pm.c +1 -1
@@ -144,7 +144,7 @@ int bfin_pm_suspend_mem_enter(void)unsigned char *memptr =kmalloc (L1_CODE_LENGTH +L1_DATA_A_LENGTH +L1_DATA_B_LENGTH +L1_SCRATCH_LENGTH , -GFP_KERNEL ); +GFP_ATOMIC );if (memptr ==NULL ) {panic ("bf53x_suspend_l1_mem malloc failed" );
Signature · 1 line
2.7.0
PATCH 18/39 m32r: fix potential NULL-pointer dereference
In reply to Jiri SlabyFrom: "Kirill A. Shutemov" <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit fecf3743b824ce4eb275ed4a1d6aee9494f6a966 upstream.
Add missing check for memory allocation fail.
--- arch/m32r/include/asm/pgalloc.h | 2 ++ 1 file changed, 2 insertions(+)
arch/m32r/include/asm/pgalloc.h +2 -0
@@ -43,6 +43,8 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm, {struct page *pte =alloc_page (GFP_KERNEL |__GFP_ZERO); +if (!pte) +return NULL ;pgtable_page_ctor (pte);return pte; }
Signature · 1 line
2.7.0
PATCH 19/39 m68k: handle pgtable_page_ctor() fail
In reply to Jiri SlabyFrom: "Kirill A. Shutemov" <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit f84c914b986ed2ec4ffaa5672b423b1f6b65519d upstream.
--- arch/m68k/include/asm/mcf_pgalloc.h | 4 ++++ arch/m68k/include/asm/motorola_pgalloc.h | 8 ++++++-- arch/m68k/include/asm/sun3_pgalloc.h | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-)
arch/m68k/include/asm/mcf_pgalloc.h +4 -0
@@ -56,6 +56,10 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,if (!page)return NULL ; +if (!pgtable_page_ctor (page)) { +__free_page (page); +return NULL ; + } pte =kmap (page);if (pte) {
arch/m68k/include/asm/motorola_pgalloc.h +6 -2
@@ -29,18 +29,22 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)static inline pgtable_t pte_alloc_one (struct mm_struct *mm,unsigned long address) { -struct page *page =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); +struct page *page;pte_t *pte; + page =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 );if (!page)return NULL ; +if (!pgtable_page_ctor (page)) { +__free_page (page); +return NULL ; + } pte =kmap (page);__flush_page_to_ram (pte);flush_tlb_kernel_page (pte);nocache_page (pte);kunmap (page); -pgtable_page_ctor (page);return page; }
arch/m68k/include/asm/sun3_pgalloc.h +4 -1
@@ -59,7 +59,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,return NULL ;clear_highpage (page); -pgtable_page_ctor (page); +if (!pgtable_page_ctor (page)) { +__free_page (page); +return NULL ; + }return page; }
Signature · 1 line
2.7.0
PATCH 20/39 m68k/mm: Check for mm != NULL in do_page_fault() debug code
In reply to Jiri SlabyFrom: Geert Uytterhoeven <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 4e25c0e92f8eaf69bc51d1d523bcb7268e7dd162 upstream.
When DEBUG is enabled, do_page_fault() may dereference a NULL pointer, causing recursive bus errors.
--- arch/m68k/mm/fault.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/m68k/mm/fault.c +1 -2
@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,#ifdef DEBUG printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n" , - regs->sr, regs->pc, address, error_code, - current->mm->pgd); + regs->sr, regs->pc, address, error_code, mm ? mm->pgd :NULL );#endif /*
Signature · 1 line
2.7.0
PATCH 21/39 m68k/mac: Make SCC reset work more reliably
In reply to Jiri SlabyFrom: Finn Thain <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 56931d73697c99ecf7aba6ae86c94d3a2d15d596 upstream.
For SCC initialization we cannot assume that the control register is in the correct state to accept a register pointer. So first read from the control register in order to "sync" up.
--- arch/m68k/kernel/head.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/m68k/kernel/head.S +3 -1
@@ -2909,7 +2909,9 @@ func_start serial_init,%d0/%d1/%a0/%a1 #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) movel %pc@(L(mac_sccbase)),%a0 - /* Reset SCC device */ + /* Reset SCC register pointer */ + moveb %a0@(mac_scc_cha_a_ctrl_offset),%d0 + /* Reset SCC device: write register pointer then register value */ moveb #9,%a0@(mac_scc_cha_a_ctrl_offset) moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset) /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
Signature · 1 line
2.7.0
PATCH 22/39 sctp: Prevent soft lockup when sctp_accept() is called during a timeout event
In reply to Jiri SlabyFrom: Karl Heiss <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 635682a14427d241bab7bbdeebb48a7d7b91638e upstream.
A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() will be taken with the listening socket but released with the new association socket. The result is a deadlock on any future attempts to take the listening socket lock.
Note that this race can occur with other SCTP timeouts that take the bh_lock_sock() in the event sctp_accept() is called.
BUG: soft lockup - CPU#9 stuck for 67s! [swapper:0] ... RIP: 0010:[<ffffffff8152d48e>] [<ffffffff8152d48e>] _spin_lock+0x1e/0x30 RSP: 0018:ffff880028323b20 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff880028323b20 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880028323be0 RDI: ffff8804632c4b48 RBP: ffffffff8100bb93 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880610662280 R11: 0000000000000100 R12: ffff880028323aa0 R13: ffff8804383c3880 R14: ffff880028323a90 R15: ffffffff81534225 FS: 0000000000000000(0000) GS:ffff880028320000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006df528 CR3: 0000000001a85000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 0, threadinfo ffff880616b70000, task ffff880616b6cab0) Stack: ffff880028323c40 ffffffffa01c2582 ffff880614cfb020 0000000000000000 <d> 0100000000000000 00000014383a6c44 ffff8804383c3880 ffff880614e93c00 <d> ffff880614e93c00 0000000000000000 ffff8804632c4b00 ffff8804383c38b8 Call Trace: <IRQ> [<ffffffffa01c2582>] ? sctp_rcv+0x492/0xa10 [sctp] [<ffffffff8148c559>] ? nf_iterate+0x69/0xb0 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8148c716>] ? nf_hook_slow+0x76/0x120 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8149757d>] ? ip_local_deliver_finish+0xdd/0x2d0 [<ffffffff81497808>] ? ip_local_deliver+0x98/0xa0 [<ffffffff81496ccd>] ? ip_rcv_finish+0x12d/0x440 [<ffffffff81497255>] ? ip_rcv+0x275/0x350 [<ffffffff8145cfeb>] ? __netif_receive_skb+0x4ab/0x750 ...
With lockdep debugging:
=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
CslRx/12087 is trying to release lock (slock-AF_INET) at:
[<ffffffffa01bcae0>] sctp_generate_timeout_event+0x40/0xe0 [sctp] but there are no more locks to release!
other info that might help us debug this:
2 locks held by CslRx/12087:
#0: (&asoc->timers[i]){+.-...}, at: [<ffffffff8108ce1f>] run_timer_softirq+0x16f/0x3e0 #1: (slock-AF_INET){+.-...}, at: [<ffffffffa01bcac3>] sctp_generate_timeout_event+0x23/0xe0 [sctp]
Ensure the socket taken is also the same one that is released by saving a copy of the socket before entering the timeout event critical section.
--- net/sctp/sm_sideeffect.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-)
net/sctp/sm_sideeffect.c +23 -19
@@ -245,12 +245,13 @@ void sctp_generate_t3_rtx_event(unsigned long peer)int error;struct sctp_transport *transport = (struct sctp_transport *) peer;struct sctp_association *asoc = transport->asoc; -struct net *net =sock_net (asoc->base.sk); +struct sock *sk = asoc->base.sk; +struct net *net =sock_net (sk);/* Check whether a task is in the sock. */ -sctp_bh_lock_sock (asoc->base.sk); -if (sock_owned_by_user (asoc->base.sk)) { +sctp_bh_lock_sock (sk); +if (sock_owned_by_user (sk)) {pr_debug ("%s: sock is busy\n" , __func__);/* Try again later. */
@@ -273,10 +274,10 @@ void sctp_generate_t3_rtx_event(unsigned long peer) transport, GFP_ATOMIC);if (error) - asoc->base.sk->sk_err = -error; + sk->sk_err = -error; out_unlock: -sctp_bh_unlock_sock (asoc->base.sk); +sctp_bh_unlock_sock (sk);sctp_transport_put (transport); }
@@ -286,11 +287,12 @@ out_unlock:static void sctp_generate_timeout_event (struct sctp_association *asoc,sctp_event_timeout_t timeout_type) { -struct net *net =sock_net (asoc->base.sk); +struct sock *sk = asoc->base.sk; +struct net *net =sock_net (sk);int error =0 ; -sctp_bh_lock_sock (asoc->base.sk); -if (sock_owned_by_user (asoc->base.sk)) { +sctp_bh_lock_sock (sk); +if (sock_owned_by_user (sk)) {pr_debug ("%s: sock is busy: timer %d\n" , __func__, timeout_type);
@@ -313,10 +315,10 @@ static void sctp_generate_timeout_event(struct sctp_association *asoc, (void *)timeout_type, GFP_ATOMIC);if (error) - asoc->base.sk->sk_err = -error; + sk->sk_err = -error; out_unlock: -sctp_bh_unlock_sock (asoc->base.sk); +sctp_bh_unlock_sock (sk);sctp_association_put (asoc); }
@@ -366,10 +368,11 @@ void sctp_generate_heartbeat_event(unsigned long data)int error =0 ;struct sctp_transport *transport = (struct sctp_transport *) data;struct sctp_association *asoc = transport->asoc; -struct net *net =sock_net (asoc->base.sk); +struct sock *sk = asoc->base.sk; +struct net *net =sock_net (sk); -sctp_bh_lock_sock (asoc->base.sk); -if (sock_owned_by_user (asoc->base.sk)) { +sctp_bh_lock_sock (sk); +if (sock_owned_by_user (sk)) {pr_debug ("%s: sock is busy\n" , __func__);/* Try again later. */
@@ -390,10 +393,10 @@ void sctp_generate_heartbeat_event(unsigned long data) transport, GFP_ATOMIC);if (error) - asoc->base.sk->sk_err = -error; + sk->sk_err = -error; out_unlock: -sctp_bh_unlock_sock (asoc->base.sk); +sctp_bh_unlock_sock (sk);sctp_transport_put (transport); }
@@ -404,10 +407,11 @@ void sctp_generate_proto_unreach_event(unsigned long data) {struct sctp_transport *transport = (struct sctp_transport *) data;struct sctp_association *asoc = transport->asoc; -struct net *net =sock_net (asoc->base.sk); +struct sock *sk = asoc->base.sk; +struct net *net =sock_net (sk); -sctp_bh_lock_sock (asoc->base.sk); -if (sock_owned_by_user (asoc->base.sk)) { +sctp_bh_lock_sock (sk); +if (sock_owned_by_user (sk)) {pr_debug ("%s: sock is busy\n" , __func__);/* Try again later. */
@@ -428,7 +432,7 @@ void sctp_generate_proto_unreach_event(unsigned long data) asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); out_unlock: -sctp_bh_unlock_sock (asoc->base.sk); +sctp_bh_unlock_sock (sk);sctp_association_put (asoc); }
Signature · 1 line
2.7.0
PATCH 23/39 USB: quirks: Fix another ELAN touchscreen
In reply to Jiri SlabyFrom: Adrien Vergé <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit df36c5bede207f734e4750beb2b14fb892050280 upstream.
Like other buggy models that had their fixes [1], the touchscreen with id 04f3:21b8 from ELAN Microelectronics needs the device-qualifier quirk. Otherwise, it fails to respond, blocks the boot for a random amount of time and pollutes dmesg with:
[ 2887.373196] usb 1-5: new full-speed USB device number 41 using xhci_hcd [ 2889.502000] usb 1-5: unable to read config index 0 descriptor/start: -71 [ 2889.502005] usb 1-5: can't read configurations, error -71 [ 2889.654571] usb 1-5: new full-speed USB device number 42 using xhci_hcd [ 2891.783438] usb 1-5: unable to read config index 0 descriptor/start: -71 [ 2891.783443] usb 1-5: can't read configurations, error -71
[1]: See commits c68929f, 876af5d, d749947, a32c99e and dc703ec.
--- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/quirks.c +3 -0
@@ -125,6 +125,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x04f3, 0x016f), .driver_info = USB_QUIRK_DEVICE_QUALIFIER }, + { USB_DEVICE(0x04f3, 0x21b8), .driver_info = + USB_QUIRK_DEVICE_QUALIFIER }, + /* Roland SC-8820 */ { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },
Signature · 1 line
2.7.0
PATCH 24/39 KEYS: Fix race between read and revoke
In reply to Jiri SlabyFrom: David Howells <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit b4a1b4f5047e4f54e194681125c74c0aa64d637d upstream.
This fixes CVE-2015-7550.
There's a race between keyctl_read() and keyctl_revoke(). If the revoke happens between keyctl_read() checking the validity of a key and the key's semaphore being taken, then the key type read method will see a revoked key.
This causes a problem for the user-defined key type because it assumes in its read method that there will always be a payload in a non-revoked key and doesn't check for a NULL pointer.
Fix this by making keyctl_read() check the validity of a key after taking semaphore instead of before.
I think the bug was introduced with the original keyrings code.
This was discovered by a multithreaded test program generated by syzkaller
(http://github.com/google/syzkaller). Here's a cleaned up version:
#include <sys/types.h>
#include <keyutils.h>
#include <pthread.h>
void *thr0(void *arg)
{
key_serial_t key = (unsigned long)arg;
keyctl_revoke(key);
return 0;
}
void *thr1(void *arg)
{
key_serial_t key = (unsigned long)arg;
char buffer[16];
keyctl_read(key, buffer, 16);
return 0;
}
int main()
{
key_serial_t key = add_key("user", "%", "foo", 3, KEY_SPEC_USER_KEYRING);
pthread_t th[5];
pthread_create(&th[0], 0, thr0, (void *)(unsigned long)key);
pthread_create(&th[1], 0, thr1, (void *)(unsigned long)key);
pthread_create(&th[2], 0, thr0, (void *)(unsigned long)key);
pthread_create(&th[3], 0, thr1, (void *)(unsigned long)key);
pthread_join(th[0], 0);
pthread_join(th[1], 0);
pthread_join(th[2], 0);
pthread_join(th[3], 0);
return 0;
}Build as:
cc -o keyctl-race keyctl-race.c -lkeyutils -lpthread
Run as:
while keyctl-race; do :; done
as it may need several iterations to crash the kernel. The crash can be summarised as:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: [<ffffffff81279b08>] user_read+0x56/0xa3 ... Call Trace: [<ffffffff81276aa9>] keyctl_read_key+0xb6/0xd7 [<ffffffff81277815>] SyS_keyctl+0x83/0xe0 [<ffffffff815dbb97>] entry_SYSCALL_64_fastpath+0x12/0x6f
--- security/keys/keyctl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
security/keys/keyctl.c +9 -9
@@ -744,16 +744,16 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)/* the key is probably readable - now try to read it */ can_read_key: - ret =key_validate (key); -if (ret ==0 ) { - ret = -EOPNOTSUPP ; -if (key->type->read) { -/* read the data with the semaphore held (since we -* might sleep) */ -down_read (&key->sem); + ret = -EOPNOTSUPP ; +if (key->type->read) { +/* Read the data with the semaphore held (since we might sleep) +* to protect against the key being updated or revoked. +*/ +down_read (&key->sem); + ret =key_validate (key); +if (ret ==0 ) ret = key->type->read (key, buffer, buflen); -up_read (&key->sem); - } +up_read (&key->sem); } error2:
Signature · 1 line
2.7.0
PATCH 25/39 KEYS: Fix keyring ref leak in join_session_keyring()
In reply to Jiri SlabyFrom: Yevgeny Pats <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 upstream.
This fixes CVE-2016-0728.
If a thread is asked to join as a session keyring the keyring that's already set as its session, we leak a keyring reference.
This can be tested with the following program:
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <keyutils.h>
int main(int argc, const char *argv[])
{
int i = 0;
key_serial_t serial;
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}
if (keyctl(KEYCTL_SETPERM, serial,
KEY_POS_ALL | KEY_USR_ALL) < 0) {
perror("keyctl");
return -1;
}
for (i = 0; i < 100; i++) {
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}
}
return 0;
}If, after the program has run, there something like the following line in /proc/keys:
3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty
with a usage count of 100 * the number of times the program has been run, then the kernel is malfunctioning. If leaked-keyring has zero usages or has been garbage collected, then the problem is fixed.
--- security/keys/process_keys.c | 1 + 1 file changed, 1 insertion(+)
security/keys/process_keys.c +1 -0
@@ -792,6 +792,7 @@ long join_session_keyring(const char *name) ret =PTR_ERR (keyring); goto error2; }else if (keyring == new->session_keyring) { +key_put (keyring); ret =0 ; goto error2; }
Signature · 1 line
2.7.0
PATCH 26/39 udp: properly support MSG_PEEK with truncated buffers
In reply to Jiri SlabyFrom: Eric Dumazet <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 197c949e7798fbf28cfadc69d9ca0c2abbf93191 upstream.
Backport of this upstream commit into stable kernels :89c22d8c3b27 ("net: Fix skb csum races when peeking") exposed a bug in udp stack vs MSG_PEEK support, when user provides a buffer smaller than skb payload.
In this case, skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr),
msg->msg_iov);
returns -EFAULT.
This bug does not happen in upstream kernels since Al Viro did a great job to replace this into :skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); This variant is safe vs short buffers.
For the time being, instead reverting Herbert Xu patch and add back skb->ip_summed invalid changes, simply store the result of udp_lib_checksum_complete() so that we avoid computing the checksum a second time, and avoid the problematic skb_copy_and_csum_datagram_iovec() call.
This patch can be applied on recent kernels as it avoids a double checksumming, then backported to stable kernels as a bug fix.
--- net/ipv4/udp.c | 6 ++++-- net/ipv6/udp.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
net/ipv4/udp.c +4 -2
@@ -1210,6 +1210,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,int peeked, off =0 ;int err;int is_udplite =IS_UDPLITE (sk); +bool checksum_valid = false;bool slow;if (flags &MSG_ERRQUEUE )
@@ -1235,11 +1236,12 @@ try_again:*/ if (copied < ulen ||UDP_SKB_CB (skb)->partial_cov) { -if (udp_lib_checksum_complete (skb)) + checksum_valid = !udp_lib_checksum_complete (skb); +if (!checksum_valid) goto csum_copy_err; } -if (skb_csum_unnecessary (skb)) +if (checksum_valid ||skb_csum_unnecessary (skb)) err =skb_copy_datagram_iovec (skb,sizeof (struct udphdr ), msg->msg_iov, copied);else {
net/ipv6/udp.c +4 -2
@@ -371,6 +371,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,int peeked, off =0 ;int err;int is_udplite =IS_UDPLITE (sk); +bool checksum_valid = false;int is_udp4;bool slow;
@@ -402,11 +403,12 @@ try_again:*/ if (copied < ulen ||UDP_SKB_CB (skb)->partial_cov) { -if (udp_lib_checksum_complete (skb)) + checksum_valid = !udp_lib_checksum_complete (skb); +if (!checksum_valid) goto csum_copy_err; } -if (skb_csum_unnecessary (skb)) +if (checksum_valid ||skb_csum_unnecessary (skb)) err =skb_copy_datagram_iovec (skb,sizeof (struct udphdr ), msg->msg_iov, copied);else {
Signature · 1 line
2.7.0
PATCH 27/39 x86/signal: Fix restart_syscall number for x32 tasks
In reply to Jiri SlabyFrom: "Dmitry V. Levin" <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 22eab1108781eff09961ae7001704f7bd8fb1dce upstream.
When restarting a syscall with regs->ax == -ERESTART_RESTARTBLOCK, regs->ax is assigned to a restart_syscall number. For x32 tasks, this syscall number must have __X32_SYSCALL_BIT set, otherwise it will be an x86_64 syscall number instead of a valid x32 syscall number. This issue has been there since the introduction of x32.
--- arch/x86/kernel/signal.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
arch/x86/kernel/signal.c +10 -7
@@ -682,12 +682,15 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)signal_setup_done (failed, ksig,test_thread_flag (TIF_SINGLESTEP )); } -#ifdef CONFIG_X86_32 -#define NR_restart_syscall __NR_restart_syscall -#else /* !CONFIG_X86_32 */ -#define NR_restart_syscall \ - test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall -#endif /* CONFIG_X86_32 */ +static inline unsigned long get_nr_restart_syscall (const struct pt_regs *regs) +{ +#if defined(CONFIG_X86_32 ) || !defined(CONFIG_X86_64 ) +return __NR_restart_syscall; +#else /* !CONFIG_X86_32 && CONFIG_X86_64 */ +return test_thread_flag (TIF_IA32 ) ? __NR_ia32_restart_syscall : + __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT); +#endif /* CONFIG_X86_32 || !CONFIG_X86_64 */ +}/* * Note that 'init' is a special process: it doesn't get signals it doesn't
@@ -716,7 +719,7 @@ static void do_signal(struct pt_regs *regs)break ;case -ERESTART_RESTARTBLOCK : - regs->ax = NR_restart_syscall; + regs->ax =get_nr_restart_syscall (regs); regs->ip -=2 ;break ; }
Signature · 1 line
2.7.0
PATCH 28/39 xen/gntdev: Grant maps should not be subject to NUMA balancing
In reply to Jiri SlabyFrom: Boris Ostrovsky <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 9c17d96500f78d7ecdb71ca6942830158bc75a2b upstream.
Doing so will cause the grant to be unmapped and then, during fault handling, the fault to be mistakenly treated as NUMA hint fault.
In addition, even if those maps could partcipate in NUMA balancing, it wouldn't provide any benefit since we are unable to determine physical page's node (even if/when VNUMA is implemented).
Marking grant maps' VMAs as VM_IO will exclude them from being part of NUMA balancing.
--- drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/gntdev.c +1 -1
@@ -763,7 +763,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) vma->vm_ops = &gntdev_vmops; - vma->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP ; + vma->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP |VM_IO ;if (use_ptemod) vma->vm_flags |=VM_DONTCOPY ;
Signature · 1 line
2.7.0
PATCH 29/39 x86/xen: don't reset vcpu_info on a cancelled suspend
In reply to Jiri SlabyFrom: "Ouyang Zhaowei (Charles)" <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 6a1f513776b78c994045287073e55bae44ed9f8c upstream.
On a cancelled suspend the vcpu_info location does not change (it's still in the per-cpu area registered by xen_vcpu_setup()). So do not call xen_hvm_init_shared_info() which would make the kernel think its back in the shared info. With the wrong vcpu_info, events cannot be received and the domain will hang after a cancelled suspend.
--- arch/x86/xen/suspend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/xen/suspend.c +2 -1
@@ -30,7 +30,8 @@ void xen_arch_hvm_post_suspend(int suspend_cancelled) {#ifdef CONFIG_XEN_PVHVM int cpu; -xen_hvm_init_shared_info (); +if (!suspend_cancelled) +xen_hvm_init_shared_info ();xen_callback_vector ();xen_unplug_emulated_devices ();if (xen_feature (XENFEAT_hvm_safe_pvclock)) {
Signature · 1 line
2.7.0
PATCH 30/39 KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR
In reply to Jiri SlabyFrom: Paul Mackerras <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit c20875a3e638e4a03e099b343ec798edd1af5cc6 upstream.
Currently it is possible for userspace (e.g. QEMU) to set a value for the MSR for a guest VCPU which has both of the TS bits set, which is an illegal combination. The result of this is that when we execute a hrfid (hypervisor return from interrupt doubleword) instruction to enter the guest, the CPU will take a TM Bad Thing type of program interrupt (vector 0x700).
Now, if PR KVM is configured in the kernel along with HV KVM, we actually handle this without crashing the host or giving hypervisor privilege to the guest; instead what happens is that we deliver a program interrupt to the guest, with SRR0 reflecting the address of the hrfid instruction and SRR1 containing the MSR value at that point. If PR KVM is not configured in the kernel, then we try to run the host's program interrupt handler with the MMU set to the guest context, which almost certainly causes a host crash.
This closes the hole by making kvmppc_set_msr_hv() check for the illegal combination and force the TS field to a safe value (00, meaning non-transactional).
--- arch/powerpc/kvm/book3s_hv.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/powerpc/kvm/book3s_hv.c +6 -0
@@ -160,6 +160,12 @@ void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)void kvmppc_set_msr (struct kvm_vcpu *vcpu,u64 msr) { +/* +* Check for illegal transactional state bit combination +* and if we find it, force the TS field to a safe state. +*/ +if ((msr &MSR_TS_MASK ) ==MSR_TS_MASK ) + msr &= ~MSR_TS_MASK ; vcpu->arch.shregs.msr = msr;kvmppc_end_cede (vcpu); }
Signature · 1 line
2.7.0
PATCH 31/39 x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
In reply to Jiri SlabyFrom: Mario Kleiner <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 2f0c0b2d96b1205efb14347009748d786c2d9ba5 upstream.
Without the reboot=pci method, the iMac 10,1 simply hangs after printing "Restarting system" at the point when it should reboot. This fixes it.
--- arch/x86/kernel/reboot.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/kernel/reboot.c +8 -0
@@ -180,6 +180,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"), }, }, + { /* Handle problems with rebooting on the iMac10,1. */ + .callback = set_pci_reboot, + .ident = "Apple iMac10,1", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac10,1"), + }, + },/* ASRock */ {/* Handle problems with rebooting on ASRock Q1900DC-ITX */
Signature · 1 line
2.7.0
PATCH 32/39 x86/boot: Double BOOT_HEAP_SIZE to 64KB
In reply to Jiri SlabyFrom: "H.J. Lu" <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 8c31902cffc4d716450be549c66a67a8a3dd479c upstream.
When decompressing kernel image during x86 bootup, malloc memory for ELF program headers may run out of heap space, which leads to system halt. This patch doubles BOOT_HEAP_SIZE to 64KB.
Tested with 32-bit kernel which failed to boot without this patch.
--- arch/x86/include/asm/boot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/boot.h +1 -1
@@ -27,7 +27,7 @@#define BOOT_HEAP_SIZE 0x400000#else /* !CONFIG_KERNEL_BZIP2 */ -#define BOOT_HEAP_SIZE 0x8000 +#define BOOT_HEAP_SIZE 0x10000#endif /* !CONFIG_KERNEL_BZIP2 */
Signature · 1 line
2.7.0
PATCH 33/39 ipmi: move timer init to before irq is setup
In reply to Jiri SlabyFrom: Jan Stancek <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 27f972d3e00b50639deb4cc1392afaeb08d3cecc upstream.
We encountered a panic on boot in ipmi_si on a dell per320 due to an uninitialized timer as follows.
static int smi_start_processing(void *send_info,
ipmi_smi_t intf)
{
/* Try to claim any interrupts. */
if (new_smi->irq_setup)
new_smi->irq_setup(new_smi);--> IRQ arrives here and irq handler tries to modify uninitialized timer
which triggers BUG_ON(!timer->function) in __mod_timer().
Call Trace: <IRQ> [<ffffffffa0532617>] start_new_msg+0x47/0x80 [ipmi_si] [<ffffffffa053269e>] start_check_enables+0x4e/0x60 [ipmi_si] [<ffffffffa0532bd8>] smi_event_handler+0x1e8/0x640 [ipmi_si] [<ffffffff810f5584>] ? __rcu_process_callbacks+0x54/0x350 [<ffffffffa053327c>] si_irq_handler+0x3c/0x60 [ipmi_si] [<ffffffff810efaf0>] handle_IRQ_event+0x60/0x170 [<ffffffff810f245e>] handle_edge_irq+0xde/0x180 [<ffffffff8100fc59>] handle_irq+0x49/0xa0 [<ffffffff8154643c>] do_IRQ+0x6c/0xf0 [<ffffffff8100ba53>] ret_from_intr+0x0/0x11
/* Set up the timer that drives the interface. */
setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);The following patch fixes the problem.
To: [email protected]
To: Corey Minyard <[email protected]>
CC: [email protected]
--- drivers/char/ipmi/ipmi_si_intf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/ipmi/ipmi_si_intf.c +4 -4
@@ -1152,14 +1152,14 @@ static int smi_start_processing(void *send_info, new_smi->intf = intf; -/* Try to claim any interrupts. */ -if (new_smi->irq_setup) - new_smi->irq_setup (new_smi); -/* Set up the timer that drives the interface. */ setup_timer (&new_smi->si_timer, smi_timeout, (long )new_smi);smi_mod_timer (new_smi, jiffies +SI_TIMEOUT_JIFFIES ); +/* Try to claim any interrupts. */ +if (new_smi->irq_setup) + new_smi->irq_setup (new_smi); +/* * Check if the user forcefully enabled the daemon. */
Signature · 1 line
2.7.0
PATCH 34/39 ALSA: hda - Add Intel Lewisburg device IDs Audio
In reply to Jiri SlabyFrom: Alexandra Yates <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 5cf92c8b3dc5da59e05dc81bdc069cedf6f38313 upstream.
Adding Intel codename Lewisburg platform device IDs for audio.
[rearranged the position by tiwai]
--- sound/pci/hda/hda_intel.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/pci/hda/hda_intel.c +5 -0
@@ -4082,6 +4082,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, { PCI_DEVICE(0x8086, 0x8d21), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, + /* Lewisburg */ + { PCI_DEVICE(0x8086, 0xa1f0), + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, + { PCI_DEVICE(0x8086, 0xa270), + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, /* Lynx Point-LP */ { PCI_DEVICE(0x8086, 0x9c20), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
Signature · 1 line
2.7.0
PATCH 35/39 ALSA: hda - Apply pin fixup for HP ProBook 6550b
In reply to Jiri SlabyFrom: Takashi Iwai <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit c932b98c1e47312822d911c1bb76e81ef50e389c upstream.
HP ProBook 6550b needs the same pin fixup applied to other HP B-series laptops with docks for making its headphone and dock headphone jacks working properly. We just need to add the codec SSID to the list.
Bugzilla: https://bugzilla.kernel.org/attachment.cgi?id=191971
--- sound/pci/hda/patch_sigmatel.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_sigmatel.c +1 -0
@@ -712,6 +712,7 @@ static bool hp_bnb2011_with_dock(struct hda_codec *codec)static bool hp_blike_system (u32 subsystem_id) {switch (subsystem_id) { +case 0x103c1473 :/* HP ProBook 6550b */ case 0x103c1520 :case 0x103c1521 :case 0x103c1523 :
Signature · 1 line
2.7.0
PATCH 36/39 MAINTAINERS: Add public mailing list for ARC
In reply to Jiri SlabyFrom: Vineet Gupta <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 9acdc911b55569145034b01075adf658891afbd2 upstream.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -8151,6 +8151,7 @@ F: include/linux/swiotlb.h SYNOPSYS ARC ARCHITECTURE M: Vineet Gupta <[email protected]> +L: [email protected] S: Supported F: arch/arc/ F: Documentation/devicetree/bindings/arc/
Signature · 1 line
2.7.0
PATCH 37/39 ARC: Fix silly typo in MAINTAINERS file commit 30b9dbee895ff0d5cbf155bd1ef3f0f5992bca6f upstream. Signed-off-by: Jiri Slaby <[email protected]>
In reply to Jiri SlabyFrom: Vineet Gupta <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -8151,7 +8151,7 @@ F: include/linux/swiotlb.h SYNOPSYS ARC ARCHITECTURE M: Vineet Gupta <[email protected]> -L: [email protected] +L: [email protected] S: Supported F: arch/arc/ F: Documentation/devicetree/bindings/arc/
Signature · 1 line
2.7.0
PATCH 38/39 isdn_ppp: Add checks for allocation failure in isdn_ppp_open()
In reply to Jiri SlabyFrom: Ben Hutchings <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 0baa57d8dc32db78369d8b5176ef56c5e2e18ab3 upstream.
Compile-tested only.
--- drivers/isdn/i4l/isdn_ppp.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/isdn/i4l/isdn_ppp.c +6 -0
@@ -301,6 +301,8 @@ isdn_ppp_open(int min, struct file *file) is->compflags =0 ; is->reset =isdn_ppp_ccp_reset_alloc (is); +if (!is->reset) +return -ENOMEM ; is->lp =NULL ; is->mp_seqno =0 ;/* MP sequence number */
@@ -320,6 +322,10 @@ isdn_ppp_open(int min, struct file *file)* VJ header compression init */ is->slcomp =slhc_init (16 ,16 );/* not necessary for 2. link in bundle */ +if (!is->slcomp) { +isdn_ppp_ccp_reset_free (is); +return -ENOMEM ; + }#endif #ifdef CONFIG_IPPP_FILTER is->pass_filter =NULL ;
Signature · 1 line
2.7.0
PATCH 39/39 ppp, slip: Validate VJ compression slot parameters completely
In reply to Jiri SlabyFrom: Ben Hutchings <[email protected]>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 4ab42d78e37a294ac7bc56901d563c642e03c4ae upstream.
Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an ERR_PTR() on error instead of NULL. Change the callers accordingly.
Compile-tested only.
References: http://article.gmane.org/gmane.comp.security.oss.general/17908
--- drivers/isdn/i4l/isdn_ppp.c | 10 ++++------ drivers/net/ppp/ppp_generic.c | 6 ++---- drivers/net/slip/slhc.c | 12 ++++++++---- drivers/net/slip/slip.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-)
drivers/isdn/i4l/isdn_ppp.c +4 -6
@@ -322,9 +322,9 @@ isdn_ppp_open(int min, struct file *file)* VJ header compression init */ is->slcomp =slhc_init (16 ,16 );/* not necessary for 2. link in bundle */ -if (!is->slcomp) { +if (IS_ERR (is->slcomp)) {isdn_ppp_ccp_reset_free (is); -return -ENOMEM ; +return PTR_ERR (is->slcomp); }#endif #ifdef CONFIG_IPPP_FILTER
@@ -574,10 +574,8 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) is->maxcid = val;#ifdef CONFIG_ISDN_PPP_VJ sltmp =slhc_init (16 , val); -if (!sltmp) { -printk (KERN_ERR "ippp, can't realloc slhc struct\n" ); -return -ENOMEM ; - } +if (IS_ERR (sltmp)) +return PTR_ERR (sltmp);if (is->slcomp)slhc_free (is->slcomp); is->slcomp = sltmp;
drivers/net/ppp/ppp_generic.c +2 -4
@@ -716,10 +716,8 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) val &=0xffff ; } vj =slhc_init (val2+1 , val+1 ); -if (!vj) { -netdev_err (ppp->dev, -"PPP: no memory (VJ compressor)\n" ); - err = -ENOMEM ; +if (IS_ERR (vj)) { + err =PTR_ERR (vj);break ; }ppp_lock (ppp);
drivers/net/slip/slhc.c +8 -4
@@ -84,8 +84,9 @@ static long decode(unsigned char **cpp);static unsigned char *put16 (unsigned char *cp,unsigned short x);static unsigned short pull16 (unsigned char **cpp); -/* Initialize compression data structure +/* Allocate compression data structure * slots must be in range 0 to 255 (zero meaning no compression) +* Returns pointer to structure or ERR_PTR() on error. */ struct slcompress *slhc_init (int rslots,int tslots)
@@ -94,11 +95,14 @@ slhc_init(int rslots, int tslots) registerstruct cstate *ts;struct slcompress *comp; +if (rslots <0 || rslots >255 || tslots <0 || tslots >255 ) +return ERR_PTR (-EINVAL ); + comp =kzalloc (sizeof (struct slcompress ),GFP_KERNEL );if (! comp) goto out_fail; -if ( rslots >0 && rslots <256 ) { +if (rslots >0 ) {size_t rsize = rslots *sizeof (struct cstate ); comp->rstate =kzalloc (rsize,GFP_KERNEL );if (! comp->rstate)
@@ -106,7 +110,7 @@ slhc_init(int rslots, int tslots) comp->rslot_limit = rslots -1 ; } -if ( tslots >0 && tslots <256 ) { +if (tslots >0 ) {size_t tsize = tslots *sizeof (struct cstate ); comp->tstate =kzalloc (tsize,GFP_KERNEL );if (! comp->tstate)
@@ -141,7 +145,7 @@ out_free2: out_free:kfree (comp); out_fail: -return NULL ; +return ERR_PTR (-ENOMEM ); }
drivers/net/slip/slip.c +1 -1
@@ -164,7 +164,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu)if (cbuff ==NULL ) goto err_exit; slcomp =slhc_init (16 ,16 ); -if (slcomp ==NULL ) +if (IS_ERR (slcomp)) goto err_exit;#endif spin_lock_bh (&sl->lock);
Signature · 1 line
2.7.0
Quoted 8 lines · Jiri Slaby
This is the start of the stable review cycle for the 3.12.53 release. There are 39 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 Wed Jan 27 12:44:04 CET 2016. Anything received after that time might be too late.
Early feedback: m68k builds fail due to 'm68k: handle pgtable_page_ctor() fail', which would also require upstream commit 390f44e2aa2ab ("mm: allow pgtable_page_ctor() to fail"). However, that commit alone doesn't add any value; it requires additional commits to make sense. I don't know what those are. Copying Kirill for advice.
Guenter
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Jiri Slaby
This is the start of the stable review cycle for the 3.12.53 release. There are 39 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.
Quoted 8 lines
Quoted 3 lines
Responses should be made by Wed Jan 27 12:44:04 CET 2016. Anything received after that time might be too late.
Early feedback: m68k builds fail due to 'm68k: handle
pgtable_page_ctor()fail',
which would also require upstream commit390f44e2aa2ab("mm: allowpgtable_page_ctor()to fail").
I noticed and pushed a fixed tree without that commit :).
Quoted 4 lines
However, that commit alone doesn't add
any value;
it requires additional commits to make sense. I don't know what those are. Copying Kirill for advice.
It needs the later rewrite where the function can actually fail.
thanks,
Signature · 2 lines
js suse labs
Quoted 8 lines · Jiri Slaby
This is the start of the stable review cycle for the 3.12.53 release. There are 39 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 Wed Jan 27 12:44:04 CET 2016. Anything received after that time might be too late.
Quoted 7 lines
The whole patch series can be found in one patch at:
http://kernel.org/pub/linux/kernel/people/jirislaby/stable-review/patch-3.12.53-rc1.xzand the diffstat can be found below.
thanks,
js
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978