This is a note to let you know that I've just added the patch titled
cls_bpf: don't decrement net's refcount when offload fails
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
cls_bpf-don-t-decrement-net-s-refcount-when-offload-fails.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Thu Dec 14 11:45:40 CET 2017
From: Jakub Kicinski <jakub.kicinski(a)netronome.com>
Date: Mon, 27 Nov 2017 11:11:41 -0800
Subject: cls_bpf: don't decrement net's refcount when offload fails
From: Jakub Kicinski <jakub.kicinski(a)netronome.com>
[ Upstream commit 25415cec502a1232b19fffc85465882b19a90415 ]
When cls_bpf offload was added it seemed like a good idea to
call cls_bpf_delete_prog() instead of extending the error
handling path, since the software state is fully initialized
at that point. This handling of errors without jumping to
the end of the function is error prone, as proven by later
commit missing that extra call to __cls_bpf_delete_prog().
__cls_bpf_delete_prog() is now expected to be invoked with
a reference on exts->net or the field zeroed out. The call
on the offload's error patch does not fullfil this requirement,
leading to each error stealing a reference on net namespace.
Create a function undoing what cls_bpf_set_parms() did and
use it from __cls_bpf_delete_prog() and the error path.
Fixes: aae2c35ec892 ("cls_bpf: use tcf_exts_get_net() before call_rcu()")
Signed-off-by: Jakub Kicinski <jakub.kicinski(a)netronome.com>
Reviewed-by: Simon Horman <simon.horman(a)netronome.com>
Acked-by: Daniel Borkmann <daniel(a)iogearbox.net>
Acked-by: Cong Wang <xiyou.wangcong(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sched/cls_bpf.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -246,11 +246,8 @@ static int cls_bpf_init(struct tcf_proto
return 0;
}
-static void __cls_bpf_delete_prog(struct cls_bpf_prog *prog)
+static void cls_bpf_free_parms(struct cls_bpf_prog *prog)
{
- tcf_exts_destroy(&prog->exts);
- tcf_exts_put_net(&prog->exts);
-
if (cls_bpf_is_ebpf(prog))
bpf_prog_put(prog->filter);
else
@@ -258,6 +255,14 @@ static void __cls_bpf_delete_prog(struct
kfree(prog->bpf_name);
kfree(prog->bpf_ops);
+}
+
+static void __cls_bpf_delete_prog(struct cls_bpf_prog *prog)
+{
+ tcf_exts_destroy(&prog->exts);
+ tcf_exts_put_net(&prog->exts);
+
+ cls_bpf_free_parms(prog);
kfree(prog);
}
@@ -509,10 +514,8 @@ static int cls_bpf_change(struct net *ne
goto errout;
ret = cls_bpf_offload(tp, prog, oldprog);
- if (ret) {
- __cls_bpf_delete_prog(prog);
- return ret;
- }
+ if (ret)
+ goto errout_parms;
if (!tc_in_hw(prog->gen_flags))
prog->gen_flags |= TCA_CLS_FLAGS_NOT_IN_HW;
@@ -529,6 +532,8 @@ static int cls_bpf_change(struct net *ne
*arg = prog;
return 0;
+errout_parms:
+ cls_bpf_free_parms(prog);
errout:
tcf_exts_destroy(&prog->exts);
kfree(prog);
Patches currently in stable-queue which might be from jakub.kicinski(a)netronome.com are
queue-4.14/cls_bpf-don-t-decrement-net-s-refcount-when-offload-fails.patch
This is the start of the stable review cycle for the 4.9.69 release.
There are 148 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 Thu Dec 14 12:43:58 UTC 2017.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.69-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.69-rc1
Leon Romanovsky <leon(a)kernel.org>
RDMA/cxgb4: Annotate r2 and stag as __be32
Zdenek Kabelac <zkabelac(a)redhat.com>
md: free unused memory after bitmap resize
Paul Moore <paul(a)paul-moore.com>
audit: ensure that 'audit=1' actually enables audit for PID 1
Keefe Liu <liuqifa(a)huawei.com>
ipvlan: fix ipv6 outbound device
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: do not call cc-option before KBUILD_CFLAGS initialization
David Howells <dhowells(a)redhat.com>
afs: Connect up the CB.ProbeUuid
Majd Dibbiny <majd(a)mellanox.com>
IB/mlx5: Assign send CQ and recv CQ of UMR QP
Mark Bloch <markb(a)mellanox.com>
IB/mlx4: Increase maximal message size under UD QP
Herbert Xu <herbert(a)gondor.apana.org.au>
xfrm: Copy policy family in clone_policy
Jason Baron <jbaron(a)akamai.com>
jump_label: Invoke jump_label_test() via early_initcall()
Arvind Yadav <arvind.yadav.cs(a)gmail.com>
atm: horizon: Fix irq release error
Masahiro Yamada <yamada.masahiro(a)socionext.com>
clk: uniphier: fix DAPLL2 clock rate of Pro5
Eric Dumazet <edumazet(a)google.com>
bpf: fix lockdep splat
Xin Long <lucien.xin(a)gmail.com>
sctp: use the right sk after waking up from wait_buf sleep
Xin Long <lucien.xin(a)gmail.com>
sctp: do not free asoc when it is already dead in sctp_sendmsg
Sergey Senozhatsky <sergey.senozhatsky.work(a)gmail.com>
zsmalloc: calling zs_map_object() from irq is a bug
Pavel Tatashin <pasha.tatashin(a)oracle.com>
sparc64/mm: set fields in deferred pages
Ming Lei <ming.lei(a)redhat.com>
block: wake up all tasks blocked in get_request()
Johan Hovold <johan(a)kernel.org>
dt-bindings: usb: fix reg-property port-number range
Darrick J. Wong <darrick.wong(a)oracle.com>
xfs: fix forgotten rcu read unlock when skipping inode reclaim
Chuck Lever <chuck.lever(a)oracle.com>
sunrpc: Fix rpc_task_begin trace point
Trond Myklebust <trond.myklebust(a)primarydata.com>
NFS: Fix a typo in nfs_rename()
Randy Dunlap <rdunlap(a)infradead.org>
dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0
Stephen Bates <sbates(a)raithlin.com>
lib/genalloc.c: make the avail variable an atomic_long_t
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()'
Xin Long <lucien.xin(a)gmail.com>
route: update fnhe_expires for redirect when the fnhe exists
Xin Long <lucien.xin(a)gmail.com>
route: also update fnhe_genid when updating a route cache
Alexey Kodanev <alexey.kodanev(a)oracle.com>
gre6: use log_ecn_error module parameter in ip6_tnl_rcv()
Ben Hutchings <ben.hutchings(a)codethink.co.uk>
mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl()
Dave Hansen <dave.hansen(a)linux.intel.com>
x86/mpx/selftests: Fix up weird arrays
Masahiro Yamada <yamada.masahiro(a)socionext.com>
coccinelle: fix parallel build with CHECK=scripts/coccicheck
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: pkg: use --transform option to prefix paths in tar
Jérémy Lefaure <jeremy.lefaure(a)lse.epita.fr>
EDAC, i5000, i5400: Fix definition of NRECMEMB register
Jérémy Lefaure <jeremy.lefaure(a)lse.epita.fr>
EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro
Alexey Kardashevskiy <aik(a)ozlabs.ru>
powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested
Jim Qu <Jim.Qu(a)amd.com>
drm/amd/amdgpu: fix console deadlock if late init failed
Jan Kara <jack(a)suse.cz>
axonram: Fix gendisk handling
Florian Westphal <fw(a)strlen.de>
netfilter: don't track fragmented packets
Johannes Thumshirn <jthumshirn(a)suse.de>
zram: set physical queue limits to avoid array out of bounds accesses
Ming Lei <tom.leiming(a)gmail.com>
blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue()
Chris Brandt <chris.brandt(a)renesas.com>
i2c: riic: fix restart condition
Krzysztof Kozlowski <krzk(a)kernel.org>
crypto: s5p-sss - Fix completing crypto request in IRQ handler
WANG Cong <xiyou.wangcong(a)gmail.com>
ipv6: reorder icmpv6_init() and ip6_mr_init()
Thomas Falcon <tlfalcon(a)linux.vnet.ibm.com>
ibmvnic: Allocate number of rx/tx buffers agreed on by firmware
Thomas Falcon <tlfalcon(a)linux.vnet.ibm.com>
ibmvnic: Fix overflowing firmware/hardware TX queue
Sowmini Varadhan <sowmini.varadhan(a)oracle.com>
rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races
Michal Schmidt <mschmidt(a)redhat.com>
bnx2x: do not rollback VF MAC/VLAN filters we did not configure
Michal Schmidt <mschmidt(a)redhat.com>
bnx2x: fix detection of VLAN filtering feature for VF
Michal Schmidt <mschmidt(a)redhat.com>
bnx2x: fix possible overrun of VFPF multicast addresses array
Michal Schmidt <mschmidt(a)redhat.com>
bnx2x: prevent crash when accessing PTP with interface down
Blomme, Maarten <Maarten.Blomme(a)flir.com>
spi_ks8995: regs_size incorrect for some devices
Blomme, Maarten <Maarten.Blomme(a)flir.com>
spi_ks8995: fix "BUG: key accdaa28 not in .data!"
Andre Przywara <andre.przywara(a)arm.com>
KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled
Mark Rutland <mark.rutland(a)arm.com>
arm64: KVM: Survive unknown traps from guests
Mark Rutland <mark.rutland(a)arm.com>
arm: KVM: Survive unknown traps from guests
Wanpeng Li <wanpeng.li(a)hotmail.com>
KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset
Franck Demathieu <fdemathieu(a)gmail.com>
irqchip/crossbar: Fix incorrect type of register size
James Smart <jsmart2021(a)gmail.com>
scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
Joe Perches <joe(a)perches.com>
scsi: qla2xxx: Fix ql_dump_buffer
Tejun Heo <tj(a)kernel.org>
workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq
Tejun Heo <tj(a)kernel.org>
libata: drop WARN from protocol error in ata_sff_qc_issue()
Jim Mattson <jmattson(a)google.com>
kvm: nVMX: VMCLEAR should not cause the vCPU to shut down
Raz Manor <Raz.Manor(a)valens.com>
usb: gadget: udc: net2280: Fix tmp reusage in net2280 driver
Petr Cvek <petr.cvek(a)tul.cz>
usb: gadget: pxa27x: Test for a valid argument pointer
Roger Quadros <rogerq(a)ti.com>
usb: dwc3: gadget: Fix system suspend/resume on TI platforms
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
USB: gadgetfs: Fix a potential memory leak in 'dev_config()'
John Keeping <john(a)metanate.com>
usb: gadget: configs: plug memory leak
Daniel Drake <drake(a)endlessm.com>
HID: chicony: Add support for another ASUS Zen AiO keyboard
Phil Reid <preid(a)electromag.com.au>
gpio: altera: Use handle_level_irq when configured as a level_high
Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
ASoC: rcar: avoid SSI_MODEx settings for SSI8
Guenter Roeck <linux(a)roeck-us.net>
ARM: OMAP2+: Release device node after it is no longer needed.
Guenter Roeck <linux(a)roeck-us.net>
ARM: OMAP2+: Fix device node reference counts
Shile Zhang <shile.zhang(a)nokia.com>
powerpc/64: Fix checksum folding in csum_add()
David Daney <david.daney(a)cavium.com>
module: set __jump_table alignment to 8
Sean Young <sean(a)mess.org>
lirc: fix dead lock between open and wakeup_filter
Nicholas Piggin <npiggin(a)gmail.com>
powerpc: Fix compiling a BE kernel with a powerpc64le toolchain
Sachin Sant <sachinp(a)linux.vnet.ibm.com>
selftest/powerpc: Fix false failures for skipped tests
Paul Mackerras <paulus(a)ozlabs.org>
powerpc/64: Invalidate process table caching after setting process table
Thomas Gleixner <tglx(a)linutronix.de>
x86/hpet: Prevent might sleep splat on resume
Peter Zijlstra <peterz(a)infradead.org>
sched/fair: Make select_idle_cpu() more aggressive
Andrew Banman <abanman(a)hpe.com>
x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register
Dmitry Safonov <dsafonov(a)virtuozzo.com>
x86/selftests: Add clobbers for int80 on x86_64
Ladislav Michl <ladis(a)linux-mips.org>
ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
Steffen Klassert <steffen.klassert(a)secunet.com>
vti6: Don't report path MTU below IPV6_MIN_MTU.
Kees Cook <keescook(a)chromium.org>
ARM: 8657/1: uaccess: consistently check object sizes
Sasha Levin <alexander.levin(a)verizon.com>
Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA"
Sasha Levin <alexander.levin(a)verizon.com>
Revert "drm/armada: Fix compile fail"
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
mm: drop unused pmdp_huge_get_and_clear_notify()
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
thp: fix MADV_DONTNEED vs. numa balancing race
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
thp: reduce indentation level in change_huge_pmd()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: avoid faulting on qemu
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: BUG if jumping to usermode address in kernel mode
John Keeping <john(a)metanate.com>
usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix ctr-aes-talitos
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix use of sg_link_tbl_len
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix AEAD for sha224 on non sha224 capable chips
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix setkey to check key weakness
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix memory corruption on SEC2
LEROY Christophe <christophe.leroy(a)c-s.fr>
crypto: talitos - fix AEAD test failures
Kim Phillips <kim.phillips(a)arm.com>
bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left.
Marc Zyngier <marc.zyngier(a)arm.com>
bus: arm-ccn: Fix use of smp_processor_id() in preemptible context
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
bus: arm-ccn: Check memory allocation failure
Marc Zyngier <marc.zyngier(a)arm.com>
bus: arm-cci: Fix use of smp_processor_id() in preemptible context
Dave Martin <Dave.Martin(a)arm.com>
arm64: fpsimd: Prevent registers leaking from dead tasks
Marc Zyngier <marc.zyngier(a)arm.com>
KVM: arm/arm64: vgic-its: Check result of allocation before use
Marc Zyngier <marc.zyngier(a)arm.com>
KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation
Christoffer Dall <christoffer.dall(a)linaro.org>
KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion
Andrew Honig <ahonig(a)google.com>
KVM: VMX: remove I/O port 0x80 bypass on Intel hosts
Marc Zyngier <marc.zyngier(a)arm.com>
arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one
Kristina Martsenko <kristina.martsenko(a)arm.com>
arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one
Laurent Caumont <lcaumont2(a)gmail.com>
media: dvb: i2c transfers over usb cannot be done from stack
Marek Szyprowski <m.szyprowski(a)samsung.com>
drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU
Daniel Thompson <daniel.thompson(a)linaro.org>
kdb: Fix handling of kallsyms_symbol_next() return value
Arend Van Spriel <arend.vanspriel(a)broadcom.com>
brcmfmac: change driver unbind order of the sdio function devices
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64s: Initialize ISAv3 MMU registers before setting partition table
Janosch Frank <frankja(a)linux.vnet.ibm.com>
KVM: s390: Fix skey emulation permission check
Heiko Carstens <heiko.carstens(a)de.ibm.com>
s390: fix compat system call table
Lai Jiangshan <jiangshanlai(a)gmail.com>
smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place
Robin Murphy <robin.murphy(a)arm.com>
iommu/vt-d: Fix scatterlist offset handling
Jaejoong Kim <climbbb.kim(a)gmail.com>
ALSA: usb-audio: Add check return value for usb_string()
Jaejoong Kim <climbbb.kim(a)gmail.com>
ALSA: usb-audio: Fix out-of-bound error
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Remove spurious WARN_ON() at timer check
Robb Glasser <rglasser(a)google.com>
ALSA: pcm: prevent UAF in snd_pcm_info
Jeff Mahoney <jeffm(a)suse.com>
btrfs: fix missing error return in btrfs_drop_snapshot
Radim Krčmář <rkrcmar(a)redhat.com>
KVM: x86: fix APIC page invalidation
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
x86/PCI: Make broadcom_postcore_init() check acpi_disabled
Eric Biggers <ebiggers(a)google.com>
X.509: fix comparisons of ->pkey_algo
Eric Biggers <ebiggers(a)google.com>
X.509: reject invalid BIT STRING for subjectPublicKey
Eric Biggers <ebiggers(a)google.com>
KEYS: add missing permission check for request_key() destination
Eric Biggers <ebiggers(a)google.com>
ASN.1: check for error from ASN1_OP_END__ACT actions
Eric Biggers <ebiggers(a)google.com>
ASN.1: fix out-of-bounds read when parsing indefinite length item
Pan Bian <bianpan2016(a)163.com>
efi/esrt: Use memunmap() instead of kfree() to free the remapping
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
efi: Move some sysfs files to be read-only by root
Huacai Chen <chenhc(a)lemote.com>
scsi: libsas: align sata_device's rps_resp on a cacheline
Huacai Chen <chenhc(a)lemote.com>
scsi: use dma_get_cache_alignment() as minimum DMA alignment
Christoph Hellwig <hch(a)lst.de>
scsi: dma-mapping: always provide dma_get_cache_alignment
William Breathitt Gray <vilhelm.gray(a)gmail.com>
isa: Prevent NULL dereference in isa_bus driver callbacks
Paul Meyer <Paul.Meyer(a)microsoft.com>
hv: kvp: Avoid reading past allocated blocks from KVP file
weiping zhang <zwp10758(a)gmail.com>
virtio: release virtio index when fail to device_register
Martin Kelly <mkelly(a)xevo.com>
can: usb_8dev: cancel urb on -EPIPE and -EPROTO
Martin Kelly <mkelly(a)xevo.com>
can: esd_usb2: cancel urb on -EPIPE and -EPROTO
Martin Kelly <mkelly(a)xevo.com>
can: ems_usb: cancel urb on -EPIPE and -EPROTO
Martin Kelly <mkelly(a)xevo.com>
can: kvaser_usb: cancel urb on -EPIPE and -EPROTO
Jimmy Assarsson <jimmyassarsson(a)gmail.com>
can: kvaser_usb: ratelimit errors if incomplete messages are received
Jimmy Assarsson <jimmyassarsson(a)gmail.com>
can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback()
Jimmy Assarsson <jimmyassarsson(a)gmail.com>
can: kvaser_usb: free buf in error paths
Oliver Stäbler <oliver.staebler(a)bytesatwork.ch>
can: ti_hecc: Fix napi poll return value for repoll
Yoshihiro Shimoda <yoshihiro.shimoda.uh(a)renesas.com>
usb: gadget: udc: renesas_usb3: fix number of the pipes
-------------
Diffstat:
.../devicetree/bindings/usb/usb-device.txt | 2 +-
Makefile | 25 ++---
arch/arm/include/asm/assembler.h | 18 ++++
arch/arm/include/asm/kvm_arm.h | 4 +-
arch/arm/include/asm/uaccess.h | 44 +++++---
arch/arm/kernel/entry-header.S | 6 ++
arch/arm/kvm/handle_exit.c | 19 ++--
arch/arm/mach-omap2/gpmc-onenand.c | 10 +-
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 25 +++--
arch/arm64/include/asm/kvm_arm.h | 3 +-
arch/arm64/kernel/process.c | 9 ++
arch/arm64/kvm/handle_exit.c | 19 ++--
arch/powerpc/Makefile | 11 +-
arch/powerpc/include/asm/checksum.h | 2 +-
arch/powerpc/kernel/cpu_setup_power.S | 2 +
arch/powerpc/mm/pgtable-radix.c | 4 +
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +
arch/powerpc/sysdev/axonram.c | 5 +-
arch/s390/kernel/syscalls.S | 6 +-
arch/s390/kvm/priv.c | 11 +-
arch/sparc/mm/init_64.c | 9 +-
arch/x86/include/asm/kvm_host.h | 3 +
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kvm/vmx.c | 31 ++----
arch/x86/kvm/x86.c | 14 +++
arch/x86/pci/broadcom_bus.c | 2 +-
arch/x86/platform/uv/tlb_uv.c | 1 -
block/blk-core.c | 4 +-
block/blk-mq-sysfs.c | 4 +-
block/blk-mq.c | 4 +-
block/blk-mq.h | 1 +
crypto/asymmetric_keys/pkcs7_verify.c | 2 +-
crypto/asymmetric_keys/x509_cert_parser.c | 2 +
crypto/asymmetric_keys/x509_public_key.c | 2 +-
drivers/ata/libata-sff.c | 1 -
drivers/atm/horizon.c | 2 +-
drivers/base/isa.c | 10 +-
drivers/block/zram/zram_drv.c | 2 +
drivers/bus/arm-cci.c | 7 +-
drivers/bus/arm-ccn.c | 11 +-
drivers/clk/uniphier/clk-uniphier-sys.c | 2 +-
drivers/crypto/s5p-sss.c | 5 +-
drivers/crypto/talitos.c | 66 ++++++++----
drivers/edac/i5000_edac.c | 8 +-
drivers/edac/i5400_edac.c | 9 +-
drivers/firmware/efi/efi.c | 3 +-
drivers/firmware/efi/esrt.c | 17 ++--
drivers/firmware/efi/runtime-map.c | 10 +-
drivers/gpio/gpio-altera.c | 26 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +-
drivers/gpu/drm/armada/Makefile | 2 -
drivers/gpu/drm/exynos/exynos_drm_gem.c | 9 ++
drivers/hid/Kconfig | 4 +-
drivers/hid/hid-chicony.c | 1 +
drivers/hid/hid-core.c | 1 +
drivers/hid/hid-ids.h | 1 +
drivers/i2c/busses/i2c-riic.c | 6 +-
drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 4 +-
drivers/infiniband/hw/mlx4/qp.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 2 +
drivers/iommu/intel-iommu.c | 8 +-
drivers/irqchip/irq-crossbar.c | 8 +-
drivers/md/bitmap.c | 9 ++
drivers/media/rc/lirc_dev.c | 4 +-
drivers/media/usb/dvb-usb/dibusb-common.c | 16 ++-
drivers/memory/omap-gpmc.c | 4 +-
drivers/net/can/ti_hecc.c | 3 +
drivers/net/can/usb/ems_usb.c | 2 +
drivers/net/can/usb/esd_usb2.c | 2 +
drivers/net/can/usb/kvaser_usb.c | 13 ++-
drivers/net/can/usb/usb_8dev.c | 2 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 36 +++++--
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 8 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 23 ++---
drivers/net/ethernet/ibm/ibmvnic.c | 43 ++++++--
drivers/net/ethernet/ibm/ibmvnic.h | 1 +
drivers/net/ipvlan/ipvlan_core.c | 2 +-
drivers/net/phy/spi_ks8995.c | 3 +-
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
drivers/net/wireless/mac80211_hwsim.c | 5 +-
drivers/rapidio/devices/rio_mport_cdev.c | 3 +-
drivers/scsi/lpfc/lpfc_els.c | 14 ++-
drivers/scsi/qla2xxx/qla_dbg.c | 12 +--
drivers/scsi/scsi_lib.c | 10 +-
drivers/spi/Kconfig | 1 -
drivers/usb/dwc3/gadget.c | 7 +-
drivers/usb/gadget/configfs.c | 1 +
drivers/usb/gadget/function/f_fs.c | 13 ++-
drivers/usb/gadget/legacy/inode.c | 4 +-
drivers/usb/gadget/udc/net2280.c | 25 ++---
drivers/usb/gadget/udc/pxa27x_udc.c | 5 +-
drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
drivers/virtio/virtio.c | 2 +
fs/afs/cmservice.c | 3 +
fs/btrfs/extent-tree.c | 1 +
fs/nfs/dir.c | 2 +-
fs/xfs/xfs_inode.c | 1 +
include/linux/dma-mapping.h | 2 -
include/linux/genalloc.h | 3 +-
include/linux/mmu_notifier.h | 13 ---
include/linux/omap-gpmc.h | 5 +-
include/linux/sysfs.h | 6 ++
include/scsi/libsas.h | 2 +-
kernel/audit.c | 10 +-
kernel/bpf/percpu_freelist.c | 8 +-
kernel/cpu.c | 10 +-
kernel/debug/kdb/kdb_io.c | 2 +-
kernel/jump_label.c | 2 +-
kernel/sched/fair.c | 2 +-
kernel/sched/features.h | 5 +
kernel/workqueue.c | 1 +
lib/asn1_decoder.c | 49 +++++----
lib/dynamic_debug.c | 4 +
lib/genalloc.c | 10 +-
mm/huge_memory.c | 84 +++++++++++-----
mm/zsmalloc.c | 2 +-
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 4 +
net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 5 -
net/ipv4/route.c | 14 ++-
net/ipv6/af_inet6.c | 10 +-
net/ipv6/ip6_gre.c | 2 +-
net/ipv6/ip6_vti.c | 8 +-
net/rds/tcp.c | 15 ++-
net/rds/tcp.h | 2 +-
net/rds/tcp_listen.c | 9 +-
net/sctp/socket.c | 38 ++++---
net/sunrpc/sched.c | 3 +-
net/xfrm/xfrm_policy.c | 1 +
scripts/coccicheck | 15 +--
scripts/module-common.lds | 2 +
scripts/package/Makefile | 5 +-
security/keys/request_key.c | 46 +++++++--
sound/core/pcm.c | 2 +
sound/core/seq/seq_timer.c | 2 +-
sound/soc/sh/rcar/ssiu.c | 6 +-
sound/usb/mixer.c | 13 ++-
tools/hv/hv_kvp_daemon.c | 70 +++----------
tools/testing/selftests/powerpc/harness.c | 6 +-
tools/testing/selftests/x86/fsgsbase.c | 2 +-
tools/testing/selftests/x86/ldt_gdt.c | 16 ++-
tools/testing/selftests/x86/mpx-hw.h | 4 +-
tools/testing/selftests/x86/ptrace_syscall.c | 3 +-
tools/testing/selftests/x86/single_step_syscall.c | 5 +-
virt/kvm/arm/hyp/vgic-v2-sr.c | 4 -
virt/kvm/arm/vgic/vgic-irqfd.c | 3 +-
virt/kvm/arm/vgic/vgic-its.c | 111 +++++++++++++--------
virt/kvm/kvm_main.c | 8 ++
148 files changed, 935 insertions(+), 545 deletions(-)
Hi Greg,
I am looking into fixing CVE-2017-12190 in chromeos-4.4.
The fix requires two patches, 95d78c28b5a85 ("fix unbalanced
page refcounting in bio_map_user_iov") and 2b04e8f6bbb1 ("more
bio_map_user_iov() leak fixes"). I noticed that the second patch
has not been applied to linux-4.4.y. Is that due to the conflict,
or was there a conscious decision not to apply it ?
On a side note, is there a working archive for stable(a)vger.kernel.org ?
The one listed at vger.kernel.org (gmane) doesn't work.
Thanks,
Guenter
The patch titled
Subject: kernel/acct.c: fix the acct->needcheck check in check_free_space()
has been added to the -mm tree. Its filename is
acct-fix-the-acct-needcheck-check-in-check_free_space.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/acct-fix-the-acct-needcheck-check-…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/acct-fix-the-acct-needcheck-check-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Oleg Nesterov <oleg(a)redhat.com>
Subject: kernel/acct.c: fix the acct->needcheck check in check_free_space()
As Tsukada explains, the time_is_before_jiffies(acct->needcheck) check is
very wrong, we need time_is_after_jiffies() to make sys_acct() work.
Ignoring the overflows, the code should "goto out" if needcheck > jiffies,
while currently it checks "needcheck < jiffies" and thus in the likely
case check_free_space() does nothing until jiffies overflow.
In particular this means that sys_acct() is simply broken, acct_on() sets
acct->needcheck = jiffies and expects that check_free_space() should set
acct->active = 1 after the free-space check, but this won't happen if
jiffies increments in between.
This was broken by commit 32dc73086015 ("get rid of timer in kern/acct.c")
in 2011, then another (correct) commit 795a2f22a8ea ("acct() should honour
the limits from the very beginning") made the problem more visible.
Link: http://lkml.kernel.org/r/20171213133940.GA6554@redhat.com
Fixes: 32dc73086015 ("get rid of timer in kern/acct.c")
Reported-by: TSUKADA Koutaro <tsukada(a)ascade.co.jp>
Suggested-by: TSUKADA Koutaro <tsukada(a)ascade.co.jp>
Signed-off-by: Oleg Nesterov <oleg(a)redhat.com>
Cc: Al Viro <viro(a)zeniv.linux.org.uk>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
kernel/acct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN kernel/acct.c~acct-fix-the-acct-needcheck-check-in-check_free_space kernel/acct.c
--- a/kernel/acct.c~acct-fix-the-acct-needcheck-check-in-check_free_space
+++ a/kernel/acct.c
@@ -102,7 +102,7 @@ static int check_free_space(struct bsd_a
{
struct kstatfs sbuf;
- if (time_is_before_jiffies(acct->needcheck))
+ if (time_is_after_jiffies(acct->needcheck))
goto out;
/* May block */
_
Patches currently in -mm which might be from oleg(a)redhat.com are
acct-fix-the-acct-needcheck-check-in-check_free_space.patch