Update to 4.2.4

Drop patches applied upstream.

Fix two ABI changes.
This commit is contained in:
Ben Hutchings 2015-10-23 01:37:19 +01:00
parent 770f544768
commit 3bbce43ea7
13 changed files with 326 additions and 775 deletions

260
debian/changelog vendored
View File

@ -1,4 +1,262 @@
linux (4.2.3-3) UNRELEASED; urgency=medium
linux (4.2.4-1) UNRELEASED; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.4
- [armhf] KVM: Fix incorrect device to IPA mapping
- [x86] KVM: vmx: fix VPID is 0000H in non-root operation
- kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd
- kvm: fix zero length mmio searching
- kvm: factor out core eventfd assign/deassign logic
- kvm: fix double free for fast mmio eventfd
- [armhf] KVM: Disable virtual timer even if the guest is not using it
- kvm: svm: reset mmu on VCPU reset
- [x86] KVM: trap AMD MSRs for the TSeg base and mask
- [powerpc*] KVM: Book3S: Take the kvm->srcu lock in
kvmppc_h_logical_ci_load/store()
- [powerpc*] KVM: Book3S HV: Pass the correct trap argument to
kvmhv_commence_exit
- [x86] Revert "KVM: x86: apply guest MTRR virtualization on host reserved
pages"
- [x86] Revert "KVM: SVM: use NPT page attributes"
- [x86] Revert "KVM: SVM: Sync g_pat with guest-written PAT value"
- time: Fix timekeeping_freqadjust()'s incorrect use of abs() instead of
abs64()
- target/iscsi: Fix np_ip bracket issue by removing np_ip
- scsi: fix scsi_error_handler vs. scsi_host_dev_release race
- target: Attach EXTENDED_COPY local I/O descriptors to xcopy_pt_sess
- target: Fix PR registration + APTPL RCU conversion regression
- iser-target: remove command with state ISTATE_REMOVE
- iser-target: Put the reference on commands waiting for unsol data
- toshiba_acpi: Fix hotkeys registration on some toshiba models
- [x86] perf/intel: Fix constraint access
- [x86] locking/qspinlock: Fix performance regression under unaccelerated
VMs
- [x86] locking/qspinlock: Only emit the test-and-set fallback when
building guest support
- [armhf] 8401/1: perf: Set affinity for PPI based PMUs
- perf hists: Update the column width for the "srcline" sort key
- perf stat: Get correct cpu id for print_aggr
- perf tools: Add missing forward declaration of struct map to probe-event.h
- perf tools: Add empty Build files for architectures lacking them
- perf tools: Fix parse_events_add_pmu caller
- perf header: Fixup reading of HEADER_NRCPUS feature
- perf probe: Use existing routine to look for a kernel module by
dso->short_name
- watchdog: sunxi: fix activation of system reset
- watchdog: imgpdc: Unregister restart handler on remove
- sched: access local runqueue directly in single_task_running
- hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most
chips
- [armhf] fix Thumb2 signal handling when ARMv6 is enabled
- [armel,armhf] 8429/1: disable GCC SRA optimization
- [powerpc*] windfarm: decrement client count when unregistering
- [armhf] dts: omap5-uevm.dts: fix i2c5 pinctrl offsets
- [armhf] dts: omap3-beagle: make i2c3, ddc and tfp410 gpio work again
- [armhf] EXYNOS: reset Little cores when cpu is up
- [armhf] dts: sunxi: Raise minimum CPU voltage for sun7i-a20 to meet SoC
specifications
- [armhf] dts: Fix wrong clock binding for sysmmu_fimd1_1 on exynos5420
- [armhf] dts: fix usb pin control for imx-rex dts
- dax: fix O_DIRECT I/O to the last block of a blockdev
- blockdev: don't set S_DAX for misaligned partitions
- block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg
- dmaengine: at_xdmac: change block increment addressing mode
- dmaengine: at_xdmac: clean used descriptor
- dmaengine: dw: properly read DWC_PARAMS register
- dmaengine: at_xdmac: fix bug in prep_dma_cyclic
- pmem: add proper fencing to pmem_rw_page()
- [x86] apic: Serialize LVTT and TSC_DEADLINE writes
- [x86] alternatives: Make optimize_nops() interrupt safe and synced
- [i386] platform: Fix Geode LX timekeeping in the generic x86 build
- [x86] ioapic: Force affinity setting in setup_ioapic_dest()
- [x86] pci/intel_mid_pci: Work around for IRQ0 assignment
- [x86] paravirt: Replace the paravirt nop with a bona fide empty function
- [amd64] nmi: Fix a paravirt stack-clobbering bug in the NMI code
- [x86] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS
- [x86] efi: Fix boot crash by mapping EFI memmap entries bottom-up at
runtime, instead of top-down
- [x86] kexec: Fix kexec crash in syscall kexec_file_load()
- [x86] process: Add proper bound checks in 64bit get_wchan()
- [x86] mm: Set NX on gap between __ex_table and rodata
- [x86] xen: Support kexec/kdump in HVM guests by doing a soft reset
- leds:lp55xx: Correct Kconfig dependency for f/w user helper
- leds/led-class: Add missing put_device()
- sched/core: Fix TASK_DEAD race in finish_task_switch()
- [s390x] compat: correct uc_sigmask of the compat signal frame
- [s390x] boot/decompression: disable floating point in decompressor
- Revert "cgroup: simplify threadgroup locking"
- Revert "sched, cgroup: replace signal_struct->group_rwsem with a global
percpu_rwsem"
- memcg: make mem_cgroup_read_stat() unsigned
- spi: Fix documentation of spi_alloc_master()
- spi: bcm2835: BUG: fix wrong use of PAGE_MASK
- spi: spidev: fix possible NULL dereference
- mm: migrate: hugetlb: putback destination hugepage to active list
- lib/iommu-common.c: do not try to deref a null iommu->lazy_flush()
pointer when n < pool->hint
- ocfs2/dlm: fix deadlock when dispatch assert master
- mm: hugetlbfs: skip shared VMAs when unmapping private pages to satisfy a
fault
- memcg: fix dirty page migration
- [armhf] ALSA: hda/tegra - async probe for avoiding module loading deadlock
- ALSA: synth: Fix conflicting OSS device registration on AWE32
- ALSA: hda: Add dock support for ThinkPad T550
- ALSA: hda - Apply SPDIF pin ctl to MacBookPro 12,1
- ALSA: hda - Disable power_save_node for IDT 92HD73xx chips
- ASoC: pxa: pxa2xx-ac97: fix dma requestor lines
- ASoC: dwc: correct irq clear method
- ASoC: db1200: Fix DAI link format for db1300 and db1550
- ASoC: sgtl5000: fix wrong register MIC_BIAS_VOLTAGE setup on probe
- ASoC: tas2552: fix dBscale-min declaration
- btrfs: skip waiting on ordered range for special files
- Btrfs: fix read corruption of compressed and shared extents
- Btrfs: update fix for read corruption of compressed and shared extents
- PCI: Fix devfn for VPD access through function 0
- PCI: Use function 0 VPD for identical functions, regular VPD for others
- PCI: Clear IORESOURCE_UNSET when clipping a bridge window
- dm thin: disable discard support for thin devices if pool's is disabled
- dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE
- ath10k: fix dma_mapping_error() handling
- svcrdma: Fix send_reply() scatter/gather set-up
- md/raid0: update queue parameter in a safer location.
- md/raid0: apply base queue limits *before* disk_stack_limits
- dm raid: fix round up of default region size
- netfilter: nfnetlink: work around wrong endianess in res_id field
- netfilter: nf_tables: Use 32 bit addressing register from
nft_type_to_reg()
- netfilter: ipset: Out of bound access in hash:net* types fixed
- netfilter: ipset: Fixing unnamed union init
- netfilter: nf_log: wait for rcu grace after logger unregistration
- netfilter: nft_compat: skip family comparison in case of NFPROTO_UNSPEC
- netfilter: nf_log: don't zap all loggers on unregister
- regulator: core: Correct return value check in regulator_resolve_supply
- regulator: axp20x: Fix enable bit indexes for DCDC4 and DCDC5
- regulator: core: Handle probe deferral from DT when resolving supplies
- Bluetooth: Delay check for conn->smp in smp_conn_security()
- nfs: fix v4.2 SEEK on files over 2 gigs
- NFS: Do cleanup before resetting pageio read/write to mds
- NFSv4: Recovery of recalled read delegations is broken
- nfs: fix pg_test page count calculation
- NFS: Fix a write performance regression
- cifs: Fix sec=krb5 on smb3 mounts
- cifs: disabling oplocks/leases via module parm enable_oplocks broken for
SMB3
- cifs: Do not fall back to SMBWriteX in set_file_size error cases
- drm/qxl: only report first monitor as connected if we have no state
- drm/qxl: recreate the primary surface when the bo is not primary
- drm/amdgpu: fix overflow on 32bit systems
- drm/amdgpu: Disable UVD PG
- drm/amdgpu: fix the UVD suspend sequence order
- drm/amdgpu: make UVD handle checking more strict
- drm/amdgpu: Fix max_vblank_count value for current display engines
- drm/amdgpu: Restore LCD backlight level on resume
- [x86] drm/i915/bios: handle MIPI Sequence Block v3+ gracefully
- drm: Reject DRI1 hw lock ioctl functions for kms drivers
- drm/radeon: Restore LCD backlight level on resume (>= R5xx)
- drm/dp/mst: fixup handling hotplug on port removal.
- drm/dp/mst: drop cancel work sync in the mstb destroy path (v2)
- xhci: give command abortion one more chance before killing xhci
- xhci: Move xhci_pme_quirk() behind #ifdef CONFIG_PM
- usb: xhci: lock mutex on xhci_stop
- usb: xhci: Clear XHCI_STATE_DYING on start
- usb: xhci: stop everything on the first call to xhci_stop
- usb: xhci: exit early in xhci_setup_device() if we're halted or dying
- xhci: change xhci 1.0 only restrictions to support xhci 1.1
- xhci: init command timeout timer earlier to avoid deleting it
uninitialized
- usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers
- batman-adv: Make DAT capability changes atomic
- thermal: cpu_cooling: don't call kcalloc() under rcu_read_lock
- thermal: cpu_cooling: free power table on error or when unregistering
- [x86] hv: util: checking the wrong variable
- mmc: dw_mmc: handle data blocks > than 4kB if IDMAC is used
- usb: chipidea: imx: fix a typo for imx6sx
- cifs: use server timestamp for ntlmv2 authentication
- [armhf] irqchip/gic-v3-its: Add missing cache flushes
- docs: update HOWTO for 3.x -> 4.x versioning
- extcon: Fix signedness bugs about break error handling
- extcon: Fix attached value returned by is_extcon_changed
- [armhf] mtd: pxa3xx_nand: add a default chunk size
- mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
- mtd: nand: sunxi: fix OOB handling in ->write_xxx() functions
- hpsa: fix an sprintf() overflow in the reset handler
- PM / AVS: rockchip-io: depend on CONFIG_POWER_AVS
- device property: fix potential NULL pointer dereference
- ath10k: fix per-vif queue locking
- ath10k: reject 11b tx fragmentation configuration
- ath10k: fix peer limit enforcement
- ath10k: wake up offchannel queue properly
- ath10k: wake up queue upon vif creation
- pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers
- ipr: Enable SIS pipe commands for SIS-32 devices.
- regmap: debugfs: Ensure we don't underflow when printing access masks
- regmap: debugfs: Don't bother actually printing when calculating max
length
- security: fix typo in security_task_prctl
- usb: musb: dsps: fix polling in device-only mode
- usb: chipidea: udc: using the correct stall implementation
- usb: Use the USB_SS_MULT() macro to get the burst multiplier.
- usb: phy: phy-generic: Fix reset behaviour on legacy boot
- usb: musb: cppi41: allow it to work again
- USB: chaoskey read offset bug
- usb: Add device quirk for Logitech PTZ cameras
- USB: Add reset-resume quirk for two Plantronics usb headphones.
- [armel,armhf] crypto: marvell - properly handle
CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests
- cpu/cacheinfo: Fix teardown path
- cpufreq: dt: Tolerance applies on both sides of target voltage
- [mips*] Fix console output for Fulong2e system
- [mips*] bootmem: Fix mapstart calculation for contiguous maps
- [mips*] dma-default: Fix 32-bit fall back to GFP_DMA
- [mips*] CPS: Stop dangling delay slot from has_mt.
- [mips*] CPS: Don't include MT code in non-MT kernels.
- [mips*] CPS: #ifdef on CONFIG_MIPS_MT_SMP rather than CONFIG_MIPS_MT
- batman-adv: Make NC capability changes atomic
- batman-adv: Make TT capability changes atomic
- batman-adv: Make MCAST capability changes atomic
- batman-adv: Fix potential synchronization issues in mcast tvlv handler
- batman-adv: Fix potentially broken skb network header access
- [powerpc*] MSI: Fix race condition in tearing down MSI interrupts
- rsi: Fix possible leak when loading firmware
- UBIFS: Kill unneeded locking in ubifs_init_security
- UBI: Validate data_size
- UBI: return ENOSPC if no enough space available
- net: via/Kconfig: GENERIC_PCI_IOMAP required if PCI not selected
- iscsi-target: Avoid OFMarker + IFMarker negotiation
- mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset
- mmc: core: fix dead loop of mmc_retune
- [arm64] efi: Fix boot crash by not padding between EFI_MEMORY_RUNTIME
regions
- [arm64] ftrace: fix function_graph tracer panic
- [arm64] readahead: fault retry breaks mmap file read random detection
- [m68k] Define asmlinkage_protect
- xen/blkback: free requests on disconnection
- net/xen-netfront: only napi_synchronize() if running
- igb: do not re-init SR-IOV during probe
- genirq: Fix race in register_irq_proc()
- clocksource: Fix abs() usage w/ 64bit values
- md/bitmap: don't pass -1 to bitmap_storage_alloc.
- nfs/filelayout: Fix NULL reference caused by double freeing of fh_array
- cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
- [armhf] clk: ti: fix dual-registration of uart4_ick
- [armhf] clk: ti: clk-7xx: Remove hardwired ABE clock configuration
- [armhf] clk: samsung: fix cpu clock's flags checking
- namei: results of d_is_negative() should be checked after dentry
revalidation
- dm: fix AB-BA deadlock in __dm_destroy()
- dm cache: fix NULL pointer when switching from cleaner policy
- staging: speakup: fix speakup-r regression
- tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c
- drivers/tty: require read access for controlling terminal
- serial: 8250: add uart_config entry for PORT_RT2880
- serial: atmel: fix error path of probe function
- mm/slab: fix unexpected index mapping result of kmalloc_size(INDEX_NODE+1)
- blk-mq: avoid setting hctx->tags->cpumask before allocation
- sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
- 3w-9xxx: don't unmap bounce buffered commands
- sched/preempt, xen: Use need_resched() instead of should_resched()
- sched/preempt, powerpc, kvm: Use need_resched() instead of
should_resched()
[ Salvatore Bonaccorso ]
* KEYS: Fix race between key destruction and finding a keyring by name

View File

@ -1,117 +0,0 @@
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed, 30 Sep 2015 12:48:40 -0400
Subject: Initialize msg/shm IPC objects before doing ipc_addid()
Origin: https://git.kernel.org/linus/b9a532277938798b53178d5a66af6e2915cb27cf
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state cannot be seen.
We already did this for the IPC semaphore code (see commit e8577d1f0329:
"ipc/sem.c: fully initialize sem_array before making it visible") but we
clearly forgot about msg and shm.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
ipc/msg.c | 14 +++++++-------
ipc/shm.c | 13 +++++++------
ipc/util.c | 8 ++++----
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/ipc/msg.c b/ipc/msg.c
index 66c4f56..1471db9 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -137,13 +137,6 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
return retval;
}
- /* ipc_addid() locks msq upon success. */
- id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
- if (id < 0) {
- ipc_rcu_putref(msq, msg_rcu_free);
- return id;
- }
-
msq->q_stime = msq->q_rtime = 0;
msq->q_ctime = get_seconds();
msq->q_cbytes = msq->q_qnum = 0;
@@ -153,6 +146,13 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
INIT_LIST_HEAD(&msq->q_receivers);
INIT_LIST_HEAD(&msq->q_senders);
+ /* ipc_addid() locks msq upon success. */
+ id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
+ if (id < 0) {
+ ipc_rcu_putref(msq, msg_rcu_free);
+ return id;
+ }
+
ipc_unlock_object(&msq->q_perm);
rcu_read_unlock();
diff --git a/ipc/shm.c b/ipc/shm.c
index 222131e..4178727 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -551,12 +551,6 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
if (IS_ERR(file))
goto no_file;
- id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
- if (id < 0) {
- error = id;
- goto no_id;
- }
-
shp->shm_cprid = task_tgid_vnr(current);
shp->shm_lprid = 0;
shp->shm_atim = shp->shm_dtim = 0;
@@ -565,6 +559,13 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
shp->shm_nattch = 0;
shp->shm_file = file;
shp->shm_creator = current;
+
+ id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
+ if (id < 0) {
+ error = id;
+ goto no_id;
+ }
+
list_add(&shp->shm_clist, &current->sysvshm.shm_clist);
/*
diff --git a/ipc/util.c b/ipc/util.c
index be42300..0f401d9 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -237,6 +237,10 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
rcu_read_lock();
spin_lock(&new->lock);
+ current_euid_egid(&euid, &egid);
+ new->cuid = new->uid = euid;
+ new->gid = new->cgid = egid;
+
id = idr_alloc(&ids->ipcs_idr, new,
(next_id < 0) ? 0 : ipcid_to_idx(next_id), 0,
GFP_NOWAIT);
@@ -249,10 +253,6 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
ids->in_use++;
- current_euid_egid(&euid, &egid);
- new->cuid = new->uid = euid;
- new->gid = new->cgid = egid;
-
if (next_id < 0) {
new->seq = ids->seq++;
if (ids->seq > IPCID_SEQ_MAX)
--
2.6.0

View File

@ -1,58 +0,0 @@
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Sat, 15 Aug 2015 13:36:12 -0500
Subject: dcache: Handle escaped paths in prepend_path
Origin: https://git.kernel.org/linus/cde93be45a8a90d8c264c776fab63487b5038a65
A rename can result in a dentry that by walking up d_parent
will never reach it's mnt_root. For lack of a better term
I call this an escaped path.
prepend_path is called by four different functions __d_path,
d_absolute_path, d_path, and getcwd.
__d_path only wants to see paths are connected to the root it passes
in. So __d_path needs prepend_path to return an error.
d_absolute_path similarly wants to see paths that are connected to
some root. Escaped paths are not connected to any mnt_root so
d_absolute_path needs prepend_path to return an error greater
than 1. So escaped paths will be treated like paths on lazily
unmounted mounts.
getcwd needs to prepend "(unreachable)" so getcwd also needs
prepend_path to return an error.
d_path is the interesting hold out. d_path just wants to print
something, and does not care about the weird cases. Which raises
the question what should be printed?
Given that <escaped_path>/<anything> should result in -ENOENT I
believe it is desirable for escaped paths to be printed as empty
paths. As there are not really any meaninful path components when
considered from the perspective of a mount tree.
So tweak prepend_path to return an empty path with an new error
code of 3 when it encounters an escaped path.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
fs/dcache.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2927,6 +2927,13 @@ restart:
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
struct mount *parent = ACCESS_ONCE(mnt->mnt_parent);
+ /* Escaped? */
+ if (dentry != vfsmnt->mnt_root) {
+ bptr = *buffer;
+ blen = *buflen;
+ error = 3;
+ break;
+ }
/* Global root? */
if (mnt != parent) {
dentry = ACCESS_ONCE(mnt->mnt_mountpoint);

View File

@ -1,61 +0,0 @@
From: Raanan Avargil <raanan.avargil@intel.com>
Date: Sun, 19 Jul 2015 16:33:20 +0300
Subject: e1000e: Fix tight loop implementation of systime read algorithm
Origin: https://git.kernel.org/linus/37b12910dd11d9ab969f2c310dc9160b7f3e3405
Change the algorithm. Read systimel twice and check for overflow.
If there was no overflow, use the first value.
If there was an overflow, read systimeh again and use the second
systimel value.
Signed-off-by: Raanan Avargil <raanan.avargil@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 31 ++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 24b7269..96a8166 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4280,18 +4280,29 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
struct e1000_adapter *adapter = container_of(cc, struct e1000_adapter,
cc);
struct e1000_hw *hw = &adapter->hw;
+ u32 systimel_1, systimel_2, systimeh;
cycle_t systim, systim_next;
- /* SYSTIMH latching upon SYSTIML read does not work well. To fix that
- * we don't want to allow overflow of SYSTIML and a change to SYSTIMH
- * to occur between reads, so if we read a vale close to overflow, we
- * wait for overflow to occur and read both registers when its safe.
+ /* SYSTIMH latching upon SYSTIML read does not work well.
+ * This means that if SYSTIML overflows after we read it but before
+ * we read SYSTIMH, the value of SYSTIMH has been incremented and we
+ * will experience a huge non linear increment in the systime value
+ * to fix that we test for overflow and if true, we re-read systime.
*/
- u32 systim_overflow_latch_fix = 0x3FFFFFFF;
-
- do {
- systim = (cycle_t)er32(SYSTIML);
- } while (systim > systim_overflow_latch_fix);
- systim |= (cycle_t)er32(SYSTIMH) << 32;
+ systimel_1 = er32(SYSTIML);
+ systimeh = er32(SYSTIMH);
+ systimel_2 = er32(SYSTIML);
+ /* Check for overflow. If there was no overflow, use the values */
+ if (systimel_1 < systimel_2) {
+ systim = (cycle_t)systimel_1;
+ systim |= (cycle_t)systimeh << 32;
+ } else {
+ /* There was an overflow, read again SYSTIMH, and use
+ * systimel_2
+ */
+ systimeh = er32(SYSTIMH);
+ systim = (cycle_t)systimel_2;
+ systim |= (cycle_t)systimeh << 32;
+ }
if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) {
u64 incvalue, time_delta, rem, temp;

View File

@ -1,100 +0,0 @@
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Mon, 31 Aug 2015 19:11:02 +0200
Subject: netfilter: conntrack: use nf_ct_tmpl_free in CT/synproxy error paths
Origin: https://git.kernel.org/linus/9cf94eab8b309e8bcc78b41dd1561c75b537dd0b
Bug-Debian: https://bugs.debian.org/800445
Commit 0838aa7fcfcd ("netfilter: fix netns dependencies with conntrack
templates") migrated templates to the new allocator api, but forgot to
update error paths for them in CT and synproxy to use nf_ct_tmpl_free()
instead of nf_conntrack_free().
Due to that, memory is being freed into the wrong kmemcache, but also
we drop the per net reference count of ct objects causing an imbalance.
In Brad's case, this leads to a wrap-around of net->ct.count and thus
lets __nf_conntrack_alloc() refuse to create a new ct object:
[ 10.340913] xt_addrtype: ipv6 does not support BROADCAST matching
[ 10.810168] nf_conntrack: table full, dropping packet
[ 11.917416] r8169 0000:07:00.0 eth0: link up
[ 11.917438] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 12.815902] nf_conntrack: table full, dropping packet
[ 15.688561] nf_conntrack: table full, dropping packet
[ 15.689365] nf_conntrack: table full, dropping packet
[ 15.690169] nf_conntrack: table full, dropping packet
[ 15.690967] nf_conntrack: table full, dropping packet
[...]
With slab debugging, it also reports the wrong kmemcache (kmalloc-512 vs.
nf_conntrack_ffffffff81ce75c0) and reports poison overwrites, etc. Thus,
to fix the problem, export and use nf_ct_tmpl_free() instead.
Fixes: 0838aa7fcfcd ("netfilter: fix netns dependencies with conntrack templates")
Reported-by: Brad Jackson <bjackson0971@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/net/netfilter/nf_conntrack.h | 1 +
net/netfilter/nf_conntrack_core.c | 3 ++-
net/netfilter/nf_synproxy_core.c | 2 +-
net/netfilter/xt_CT.c | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 37cd391..4023c4c 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -292,6 +292,7 @@ extern unsigned int nf_conntrack_hash_rnd;
void init_nf_conntrack_hash_rnd(void);
struct nf_conn *nf_ct_tmpl_alloc(struct net *net, u16 zone, gfp_t flags);
+void nf_ct_tmpl_free(struct nf_conn *tmpl);
#define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 3c20d02..0625a42 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -320,12 +320,13 @@ out_free:
}
EXPORT_SYMBOL_GPL(nf_ct_tmpl_alloc);
-static void nf_ct_tmpl_free(struct nf_conn *tmpl)
+void nf_ct_tmpl_free(struct nf_conn *tmpl)
{
nf_ct_ext_destroy(tmpl);
nf_ct_ext_free(tmpl);
kfree(tmpl);
}
+EXPORT_SYMBOL_GPL(nf_ct_tmpl_free);
static void
destroy_conntrack(struct nf_conntrack *nfct)
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index d7f1685..d6ee8f8 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -378,7 +378,7 @@ static int __net_init synproxy_net_init(struct net *net)
err3:
free_percpu(snet->stats);
err2:
- nf_conntrack_free(ct);
+ nf_ct_tmpl_free(ct);
err1:
return err;
}
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 43ddeee..f3377ce 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -233,7 +233,7 @@ out:
return 0;
err3:
- nf_conntrack_free(ct);
+ nf_ct_tmpl_free(ct);
err2:
nf_ct_l3proto_module_put(par->family);
err1:

View File

@ -1,79 +0,0 @@
From: Johan Hovold <johan@kernel.org>
Date: Wed, 23 Sep 2015 11:41:42 -0700
Subject: USB: whiteheat: fix potential null-deref at probe
Origin: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit?id=cbb4be652d374f64661137756b8f357a1827d6a4
Fix potential null-pointer dereference at probe by making sure that the
required endpoints are present.
The whiteheat driver assumes there are at least five pairs of bulk
endpoints, of which the final pair is used for the "command port". An
attempt to bind to an interface with fewer bulk endpoints would
currently lead to an oops.
Fixes CVE-2015-5257.
Reported-by: Moein Ghasemzadeh <moein@istuary.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/whiteheat.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 6c3734d..d3ea90b 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -80,6 +80,8 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
static int whiteheat_firmware_attach(struct usb_serial *serial);
/* function prototypes for the Connect Tech WhiteHEAT serial converter */
+static int whiteheat_probe(struct usb_serial *serial,
+ const struct usb_device_id *id);
static int whiteheat_attach(struct usb_serial *serial);
static void whiteheat_release(struct usb_serial *serial);
static int whiteheat_port_probe(struct usb_serial_port *port);
@@ -116,6 +118,7 @@ static struct usb_serial_driver whiteheat_device = {
.description = "Connect Tech - WhiteHEAT",
.id_table = id_table_std,
.num_ports = 4,
+ .probe = whiteheat_probe,
.attach = whiteheat_attach,
.release = whiteheat_release,
.port_probe = whiteheat_port_probe,
@@ -217,6 +220,34 @@ static int whiteheat_firmware_attach(struct usb_serial *serial)
/*****************************************************************************
* Connect Tech's White Heat serial driver functions
*****************************************************************************/
+
+static int whiteheat_probe(struct usb_serial *serial,
+ const struct usb_device_id *id)
+{
+ struct usb_host_interface *iface_desc;
+ struct usb_endpoint_descriptor *endpoint;
+ size_t num_bulk_in = 0;
+ size_t num_bulk_out = 0;
+ size_t min_num_bulk;
+ unsigned int i;
+
+ iface_desc = serial->interface->cur_altsetting;
+
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) {
+ endpoint = &iface_desc->endpoint[i].desc;
+ if (usb_endpoint_is_bulk_in(endpoint))
+ ++num_bulk_in;
+ if (usb_endpoint_is_bulk_out(endpoint))
+ ++num_bulk_out;
+ }
+
+ min_num_bulk = COMMAND_PORT + 1;
+ if (num_bulk_in < min_num_bulk || num_bulk_out < min_num_bulk)
+ return -ENODEV;
+
+ return 0;
+}
+
static int whiteheat_attach(struct usb_serial *serial)
{
struct usb_serial_port *command_port;

View File

@ -1,104 +0,0 @@
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Sat, 15 Aug 2015 20:27:13 -0500
Subject: vfs: Test for and handle paths that are unreachable from their mnt_root
Origin: https://git.kernel.org/linus/397d425dc26da728396e66d392d5dcb8dac30c37
In rare cases a directory can be renamed out from under a bind mount.
In those cases without special handling it becomes possible to walk up
the directory tree to the root dentry of the filesystem and down
from the root dentry to every other file or directory on the filesystem.
Like division by zero .. from an unconnected path can not be given
a useful semantic as there is no predicting at which path component
the code will realize it is unconnected. We certainly can not match
the current behavior as the current behavior is a security hole.
Therefore when encounting .. when following an unconnected path
return -ENOENT.
- Add a function path_connected to verify path->dentry is reachable
from path->mnt.mnt_root. AKA to validate that rename did not do
something nasty to the bind mount.
To avoid races path_connected must be called after following a path
component to it's next path component.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
fs/namei.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 1c2105e..29b9279 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -560,6 +560,24 @@ static int __nd_alloc_stack(struct nameidata *nd)
return 0;
}
+/**
+ * path_connected - Verify that a path->dentry is below path->mnt.mnt_root
+ * @path: nameidate to verify
+ *
+ * Rename can sometimes move a file or directory outside of a bind
+ * mount, path_connected allows those cases to be detected.
+ */
+static bool path_connected(const struct path *path)
+{
+ struct vfsmount *mnt = path->mnt;
+
+ /* Only bind mounts can have disconnected paths */
+ if (mnt->mnt_root == mnt->mnt_sb->s_root)
+ return true;
+
+ return is_subdir(path->dentry, mnt->mnt_root);
+}
+
static inline int nd_alloc_stack(struct nameidata *nd)
{
if (likely(nd->depth != EMBEDDED_LEVELS))
@@ -1296,6 +1314,8 @@ static int follow_dotdot_rcu(struct nameidata *nd)
return -ECHILD;
nd->path.dentry = parent;
nd->seq = seq;
+ if (unlikely(!path_connected(&nd->path)))
+ return -ENOENT;
break;
} else {
struct mount *mnt = real_mount(nd->path.mnt);
@@ -1396,7 +1416,7 @@ static void follow_mount(struct path *path)
}
}
-static void follow_dotdot(struct nameidata *nd)
+static int follow_dotdot(struct nameidata *nd)
{
if (!nd->root.mnt)
set_root(nd);
@@ -1412,6 +1432,8 @@ static void follow_dotdot(struct nameidata *nd)
/* rare case of legitimate dget_parent()... */
nd->path.dentry = dget_parent(nd->path.dentry);
dput(old);
+ if (unlikely(!path_connected(&nd->path)))
+ return -ENOENT;
break;
}
if (!follow_up(&nd->path))
@@ -1419,6 +1441,7 @@ static void follow_dotdot(struct nameidata *nd)
}
follow_mount(&nd->path);
nd->inode = nd->path.dentry->d_inode;
+ return 0;
}
/*
@@ -1634,7 +1657,7 @@ static inline int handle_dots(struct nameidata *nd, int type)
if (nd->flags & LOOKUP_RCU) {
return follow_dotdot_rcu(nd);
} else
- follow_dotdot(nd);
+ return follow_dotdot(nd);
}
return 0;
}

View File

@ -1,49 +0,0 @@
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 4 Sep 2015 16:32:17 +0200
Subject: [1/2] MIPS: BPF: Avoid unreachable code on little endian
Origin: https://git.kernel.org/linus/faa9724a674e5e52316bb0d173aed16bd17d536c
On little endian, avoid generating the big endian version of the code
by using #else in addition to #ifdef #endif. Also fix one alignment
issue wrt delay slot.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: stable@vger.kernel.org # v4.2+
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/mips/net/bpf_jit_asm.S | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/mips/net/bpf_jit_asm.S b/arch/mips/net/bpf_jit_asm.S
index e927260..4f54cb1 100644
--- a/arch/mips/net/bpf_jit_asm.S
+++ b/arch/mips/net/bpf_jit_asm.S
@@ -151,9 +151,10 @@ NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
wsbh t0, $r_s0
jr $r_ra
rotr $r_A, t0, 16
-#endif
+#else
jr $r_ra
- move $r_A, $r_s0
+ move $r_A, $r_s0
+#endif
END(bpf_slow_path_word)
@@ -162,9 +163,10 @@ NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
jr $r_ra
wsbh $r_A, $r_s0
-#endif
+#else
jr $r_ra
move $r_A, $r_s0
+#endif
END(bpf_slow_path_half)
--
2.1.4

View File

@ -1,117 +0,0 @@
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Sat, 5 Sep 2015 17:02:59 +0200
Subject: [2/2] MIPS: BPF: Fix build on pre-R2 little endian CPUs
Origin: https://git.kernel.org/linus/b259e51f2e29390518021f9b8df55a3de42f371b
The rotr, seh and wsbh instructions have been introduced with the R2
ISA. Thus the current BPF code fails to build on pre-R2 little endian
CPUs:
CC arch/mips/net/bpf_jit.o
AS arch/mips/net/bpf_jit_asm.o
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S: Assembler messages:
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:67: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$19'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:68: Error: opcode not supported on this processor: mips32 (mips32) `rotr $19,$8,16'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:83: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$19'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:84: Error: opcode not supported on this processor: mips32 (mips32) `seh $19,$8'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:151: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$12'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:153: Error: opcode not supported on this processor: mips32 (mips32) `rotr $19,$8,16'
/home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:164: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $19,$12'
/home/aurel32/linux-4.2/scripts/Makefile.build:294: recipe for target 'arch/mips/net/bpf_jit_asm.o' failed
Fix that by providing equivalent code for these CPUs.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: stable@vger.kernel.org # v4.2+
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/mips/net/bpf_jit_asm.S | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/arch/mips/net/bpf_jit_asm.S b/arch/mips/net/bpf_jit_asm.S
index 4f54cb1..dabf417 100644
--- a/arch/mips/net/bpf_jit_asm.S
+++ b/arch/mips/net/bpf_jit_asm.S
@@ -64,8 +64,20 @@ sk_load_word_positive:
PTR_ADDU t1, $r_skb_data, offset
lw $r_A, 0(t1)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
wsbh t0, $r_A
rotr $r_A, t0, 16
+# else
+ sll t0, $r_A, 24
+ srl t1, $r_A, 24
+ srl t2, $r_A, 8
+ or t0, t0, t1
+ andi t2, t2, 0xff00
+ andi t1, $r_A, 0xff00
+ or t0, t0, t2
+ sll t1, t1, 8
+ or $r_A, t0, t1
+# endif
#endif
jr $r_ra
move $r_ret, zero
@@ -80,8 +92,16 @@ sk_load_half_positive:
PTR_ADDU t1, $r_skb_data, offset
lh $r_A, 0(t1)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
wsbh t0, $r_A
seh $r_A, t0
+# else
+ sll t0, $r_A, 24
+ andi t1, $r_A, 0xff00
+ sra t0, t0, 16
+ srl t1, t1, 8
+ or $r_A, t0, t1
+# endif
#endif
jr $r_ra
move $r_ret, zero
@@ -148,9 +168,22 @@ sk_load_byte_positive:
NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
bpf_slow_path_common(4)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
wsbh t0, $r_s0
jr $r_ra
rotr $r_A, t0, 16
+# else
+ sll t0, $r_s0, 24
+ srl t1, $r_s0, 24
+ srl t2, $r_s0, 8
+ or t0, t0, t1
+ andi t2, t2, 0xff00
+ andi t1, $r_s0, 0xff00
+ or t0, t0, t2
+ sll t1, t1, 8
+ jr $r_ra
+ or $r_A, t0, t1
+# endif
#else
jr $r_ra
move $r_A, $r_s0
@@ -161,8 +194,17 @@ NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
bpf_slow_path_common(2)
#ifdef CONFIG_CPU_LITTLE_ENDIAN
+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
jr $r_ra
wsbh $r_A, $r_s0
+# else
+ sll t0, $r_s0, 8
+ andi t1, $r_s0, 0xff00
+ andi t0, t0, 0xff00
+ srl t1, t1, 8
+ jr $r_ra
+ or $r_A, t0, t1
+# endif
#else
jr $r_ra
move $r_A, $r_s0
--
2.1.4

View File

@ -1,80 +0,0 @@
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 24 Sep 2015 17:36:51 +0200
Subject: ALSA: hda - Disable power_save_node for Thinkpads
Origin: https://git.kernel.org/linus/7f57d803ee03730d570dc59a9e3e4842b58dd5cc
Lenovo Thinkpads with recent Realtek codecs seem suffering from click
noises at power transition since the introduction of widget power
saving in 4.1 kernel. Although this might be solved by some delays in
appropriate points, as a quick workaround, just disable the
power_save_node feature for now. The gain it gives is relatively
small, and this makes the situation back to pre 4.1 time.
This patch ended up with a bit more code changes than usual because
the existing fixup for Thinkpads is highly chained. Instead of adding
yet another chain, combine a few of them into a single fixup entry, as
a gratis cleanup.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=943982
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_realtek.c | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a75b561..afec6dc 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4188,6 +4188,24 @@ static void alc_fixup_disable_aamix(struct hda_codec *codec,
}
}
+/* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
+static void alc_fixup_tpt440_dock(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ static const struct hda_pintbl pincfgs[] = {
+ { 0x16, 0x21211010 }, /* dock headphone */
+ { 0x19, 0x21a11010 }, /* dock mic */
+ { }
+ };
+ struct alc_spec *spec = codec->spec;
+
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
+ codec->power_save_node = 0; /* avoid click noises */
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ }
+}
+
static void alc_shutup_dell_xps13(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
@@ -4562,7 +4580,6 @@ enum {
ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC292_FIXUP_TPT440_DOCK,
- ALC292_FIXUP_TPT440_DOCK2,
ALC283_FIXUP_BXBT2807_MIC,
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS,
@@ -5029,17 +5046,7 @@ static const struct hda_fixup alc269_fixups[] = {
},
[ALC292_FIXUP_TPT440_DOCK] = {
.type = HDA_FIXUP_FUNC,
- .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
- .chained = true,
- .chain_id = ALC292_FIXUP_TPT440_DOCK2
- },
- [ALC292_FIXUP_TPT440_DOCK2] = {
- .type = HDA_FIXUP_PINS,
- .v.pins = (const struct hda_pintbl[]) {
- { 0x16, 0x21211010 }, /* dock headphone */
- { 0x19, 0x21a11010 }, /* dock mic */
- { }
- },
+ .v.func = alc_fixup_tpt440_dock,
.chained = true,
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
},

View File

@ -0,0 +1,47 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 23 Oct 2015 00:55:53 +0100
Subject: signal: Fix ABI change in 4.2.4
Forwarded: not-needed
The field signal_struct::group_rwsem was re-added. This structure is
always allocated by copy_signal() and only used by built-in code, so
it's safe to add fields at the end but not in the middle. Move it to
the end and hide it from genksyms.
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -754,6 +754,17 @@ struct signal_struct {
unsigned audit_tty_log_passwd;
struct tty_audit_buf *tty_audit_buf;
#endif
+
+ oom_flags_t oom_flags;
+ short oom_score_adj; /* OOM kill score adjustment */
+ short oom_score_adj_min; /* OOM kill score adjustment min value.
+ * Only settable by CAP_SYS_RESOURCE. */
+
+ struct mutex cred_guard_mutex; /* guard against foreign influences on
+ * credential calculations
+ * (notably. ptrace) */
+
+#ifndef __GENKSYMS__
#ifdef CONFIG_CGROUPS
/*
* group_rwsem prevents new tasks from entering the threadgroup and
@@ -766,15 +777,7 @@ struct signal_struct {
*/
struct rw_semaphore group_rwsem;
#endif
-
- oom_flags_t oom_flags;
- short oom_score_adj; /* OOM kill score adjustment */
- short oom_score_adj_min; /* OOM kill score adjustment min value.
- * Only settable by CAP_SYS_RESOURCE. */
-
- struct mutex cred_guard_mutex; /* guard against foreign influences on
- * credential calculations
- * (notably. ptrace) */
+#endif
};
/*

View File

@ -0,0 +1,17 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 23 Oct 2015 00:51:44 +0100
Subject: target: Fix ABI change in 4.2.4
Forwarded: not-needed
Restore the now-redundant iscsi_np::np_ip field to avoid an ABI change.
--- a/include/target/iscsi/iscsi_target_core.h
+++ b/include/target/iscsi/iscsi_target_core.h
@@ -776,6 +776,7 @@ struct iscsi_np {
enum iscsi_timer_flags_table np_login_timer_flags;
u32 np_exports;
enum np_flags_table np_flags;
+ unsigned char np_ip[IPV6_ADDRESS_SPACE]; /* now unused */
u16 np_port;
spinlock_t np_thread_lock;
struct completion np_restart_comp;

12
debian/patches/series vendored
View File

@ -46,8 +46,6 @@ debian/qxl-disable-modeset-by-default.patch
# Arch bug fixes
bugfix/mips/disable-advansys.patch
bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch
bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch
bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch
bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch
@ -89,18 +87,11 @@ features/all/grsecurity/grsecurity-kconfig.patch
features/all/grsecurity/grkernsec_perf_harden.patch
bugfix/all/gfs2-make-statistics-unsigned-suitable-for-use-with-.patch
bugfix/all/dcache-handle-escaped-paths-in-prepend_path.patch
bugfix/all/dcache-reduce-the-scope-of-i_lock-in-d_splice_alias.patch
bugfix/all/vfs-test-for-and-handle-paths-that-are-unreachable-f.patch
bugfix/all/rds-verify-the-underlying-transport-exists-before-cr.patch
bugfix/all/e1000e-fix-tight-loop-implementation-of-systime-read.patch
bugfix/all/usb-whiteheat-fix-potential-null-deref-at-probe.patch
bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch
bugfix/all/ovl-conditionally-use-o_largefile-in-ovl_copy_up.patch
bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch
bugfix/all/netfilter-conntrack-use-nf_ct_tmpl_free-in-ct-synpro.patch
bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch
features/all/ath10k-add-qca6164-support.patch
debian/block-fix-abi-change-in-4.2.2.patch
bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch
@ -111,3 +102,6 @@ bugfix/all/nbd-add-locking-for-tasks.patch
bugfix/all/KEYS-Fix-race-between-key-destruction-and-finding-a-.patch
bugfix/all/KEYS-Fix-crash-when-attempt-to-garbage-collect-an-un.patch
bugfix/all/KEYS-Don-t-permit-request_key-to-construct-a-new-key.patch
debian/target-fix-abi-change-in-4.2.4.patch
debian/signal-fix-abi-change-in-4.2.4.patch