From: Dominique Martinet <asmadeus(a)codewreck.org>
[ Upstream commit 38d222b3163f7b7d737e5d999ffc890a12870e36 ]
It's possible for v9fs_fid_find "find by dentry" branch to not turn up
anything despite having an entry set (because e.g. uid doesn't match),
in which case the calling code will generally make an extra lookup
to the server.
In this case we might have had better luck looking by inode, so fall
back to look up by inode if we have one and the lookup by dentry failed.
Message-Id: <20240523210024.1214386-1-asmadeus(a)codewreck.org>
Reviewed-by: Christian Schoenebeck <linux_oss(a)crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus(a)codewreck.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/9p/fid.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index de009a33e0e26..f84412290a30c 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
}
}
spin_unlock(&dentry->d_lock);
- } else {
- if (dentry->d_inode)
- ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
}
+ if (!ret && dentry->d_inode)
+ ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
return ret;
}
--
2.43.0
From: Dominique Martinet <asmadeus(a)codewreck.org>
[ Upstream commit 38d222b3163f7b7d737e5d999ffc890a12870e36 ]
It's possible for v9fs_fid_find "find by dentry" branch to not turn up
anything despite having an entry set (because e.g. uid doesn't match),
in which case the calling code will generally make an extra lookup
to the server.
In this case we might have had better luck looking by inode, so fall
back to look up by inode if we have one and the lookup by dentry failed.
Message-Id: <20240523210024.1214386-1-asmadeus(a)codewreck.org>
Reviewed-by: Christian Schoenebeck <linux_oss(a)crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus(a)codewreck.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/9p/fid.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index de009a33e0e26..f84412290a30c 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
}
}
spin_unlock(&dentry->d_lock);
- } else {
- if (dentry->d_inode)
- ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
}
+ if (!ret && dentry->d_inode)
+ ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
return ret;
}
--
2.43.0
This problem reported by Clement LE GOFFIC manifest when
using CONFIG_KASAN_IN_VMALLOC and VMAP_STACK:
https://lore.kernel.org/linux-arm-kernel/a1a1d062-f3a2-4d05-9836-3b098de9db…
After some analysis it seems we are missing to sync the
VMALLOC shadow memory in top level PGD to all CPUs.
Add some code to perform this sync, and the bug appears
to go away.
As suggested by Ard, also perform a dummy read from the
shadow memory of the new VMAP_STACK in the low level
assembly.
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
---
Changes in v4:
- Since Kasan is not using header stubs, it is necessary to avoid
kasan_*() calls using ifdef when compiling without KASAN.
- Lift a line aligning the end of vmalloc from Melon Liu's
very similar patch so we have feature parity, credit Melon
as co-developer.
- Include the atomic_read_acquire() patch in the series due
to context requirements.
- Verify that the after the patch the kernel still builds and boots
without Kasan.
- Link to v3: https://lore.kernel.org/r/20241017-arm-kasan-vmalloc-crash-v3-0-d2a34cd5b66…
Changes in v3:
- Collect Mark Rutlands ACK on patch 1
- Change the simplified assembly add r2, ip, lsr #n to the canonical
add r2, r2, ip, lsr #n in patch 2.
- Link to v2: https://lore.kernel.org/r/20241016-arm-kasan-vmalloc-crash-v2-0-0a52fd086ee…
Changes in v2:
- Implement the two helper functions suggested by Russell
making the KASAN PGD copying less messy.
- Link to v1: https://lore.kernel.org/r/20241015-arm-kasan-vmalloc-crash-v1-0-dbb23592ca8…
---
Linus Walleij (3):
ARM: ioremap: Sync PGDs for VMALLOC shadow
ARM: entry: Do a dummy read from VMAP shadow
mm: Pair atomic_set_release() with _read_acquire()
arch/arm/kernel/entry-armv.S | 8 ++++++++
arch/arm/mm/ioremap.c | 35 ++++++++++++++++++++++++++++++-----
2 files changed, 38 insertions(+), 5 deletions(-)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241015-arm-kasan-vmalloc-crash-fcbd51416457
Best regards,
--
Linus Walleij <linus.walleij(a)linaro.org>
On 2024/10/23 1:44, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
> selftests: mm: fix the incorrect usage() info of khugepaged
>
> to the 6.11-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:
> selftests-mm-fix-the-incorrect-usage-info-of-khugepa.patch
> and it can be found in the queue-6.11 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.
Hi,
I don't think this patch needs to be added to the stable tree because
this just fixes usage
information, as Andrew had previously said:
https://lore.kernel.org/lkml/20241017001441.2db5adaaa63dc3faa0934204@linux-…
>
>
>
> commit ad8b93ffe0a86e3b6be297826cd34b12080fc877
> Author: Nanyong Sun <sunnanyong(a)huawei.com>
> Date: Tue Oct 15 10:02:57 2024 +0800
>
> selftests: mm: fix the incorrect usage() info of khugepaged
>
> [ Upstream commit 3e822bed2fbd1527d88f483342b1d2a468520a9a ]
>
> The mount option of tmpfs should be huge=advise, not madvise which is not
> supported and may mislead the users.
>
> Link: https://lkml.kernel.org/r/20241015020257.139235-1-sunnanyong@huawei.com
> Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing")
> Signed-off-by: Nanyong Sun <sunnanyong(a)huawei.com>
> Reviewed-by: Baolin Wang <baolin.wang(a)linux.alibaba.com>
> Reviewed-by: Anshuman Khandual <anshuman.khandual(a)arm.com>
> Cc: Kefeng Wang <wangkefeng.wang(a)huawei.com>
> Cc: Shuah Khan <shuah(a)kernel.org>
> Cc: Zach O'Keefe <zokeefe(a)google.com>
> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
> Signed-off-by: Sasha Levin <sashal(a)kernel.org>
>
> diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
> index 829320a519e72..89dec42986825 100644
> --- a/tools/testing/selftests/mm/khugepaged.c
> +++ b/tools/testing/selftests/mm/khugepaged.c
> @@ -1091,7 +1091,7 @@ static void usage(void)
> fprintf(stderr, "\n\t\"file,all\" mem_type requires kernel built with\n");
> fprintf(stderr, "\tCONFIG_READ_ONLY_THP_FOR_FS=y\n");
> fprintf(stderr, "\n\tif [dir] is a (sub)directory of a tmpfs mount, tmpfs must be\n");
> - fprintf(stderr, "\tmounted with huge=madvise option for khugepaged tests to work\n");
> + fprintf(stderr, "\tmounted with huge=advise option for khugepaged tests to work\n");
> fprintf(stderr, "\n\tSupported Options:\n");
> fprintf(stderr, "\t\t-h: This help message.\n");
> fprintf(stderr, "\t\t-s: mTHP size, expressed as page order.\n");
> .
This is the start of the stable review cycle for the 6.1.114 release.
There are 91 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, 23 Oct 2024 10:22:25 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.114-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.114-rc1
Vasiliy Kovalev <kovalev(a)altlinux.org>
ALSA: hda/conexant - Use cached pin control for Node 0x1d on HP EliteOne 1000 G2
Nicholas Piggin <npiggin(a)gmail.com>
powerpc/64: Add big-endian ELFv2 flavour to crypto VMX asm generation
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: propagate directory read errors from nilfs_find_entry()
Paolo Abeni <pabeni(a)redhat.com>
mptcp: prevent MPC handshake on port-based signal endpoints
Paolo Abeni <pabeni(a)redhat.com>
tcp: fix mptcp DSS corruption due to large pmtu xmit
Nam Cao <namcao(a)linutronix.de>
irqchip/sifive-plic: Unmask interrupt in plic_irq_enable()
Marc Zyngier <maz(a)kernel.org>
irqchip/gic-v4: Don't allow a VMOVP on a dying VPE
Ma Ke <make24(a)iscas.ac.cn>
pinctrl: apple: check devm_kasprintf() returned value
Sergey Matsievskiy <matsievskiysv(a)gmail.com>
pinctrl: ocelot: fix system hang on level based interrupts
Longlong Xia <xialonglong(a)kylinos.cn>
tty: n_gsm: Fix use-after-free in gsm_cleanup_mux
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/entry_32: Clear CPU buffers after register restore in NMI return
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/entry_32: Do not clobber user EFLAGS.ZF
Zhang Rui <rui.zhang(a)intel.com>
x86/apic: Always explicitly disarm TSC-deadline timer
Nathan Chancellor <nathan(a)kernel.org>
x86/resctrl: Annotate get_mem_config() functions as __init
Takashi Iwai <tiwai(a)suse.de>
parport: Proper fix for array out-of-bounds access
Prashanth K <quic_prashk(a)quicinc.com>
usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN920C04 MBIM compositions
Benjamin B. Frost <benjamin(a)geanix.com>
USB: serial: option: add support for Quectel EG916Q-GL
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Mitigate failed set dequeue pointer commands
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Fix incorrect stream context type macro
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001
Aaron Thompson <dev(a)aaront.org>
Bluetooth: ISO: Fix multiple init when debugfs is disabled
Aaron Thompson <dev(a)aaront.org>
Bluetooth: Remove debugfs directory on module init failure
Aaron Thompson <dev(a)aaront.org>
Bluetooth: Call iso_exit() on module unload
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: dac: ad3552r: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: dac: ad5766: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig
Emil Gedenryd <emil.gedenryd(a)axis.com>
iio: light: opt3001: add missing full-scale range value
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: light: veml6030: fix IIO device retrieval from embedded device
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: light: veml6030: fix ALS sensor resolution
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig
Mohammed Anees <pvmohammedanees2003(a)gmail.com>
drm/amdgpu: prevent BO_HANDLES error from being overwritten
Alex Deucher <alexander.deucher(a)amd.com>
drm/amdgpu/swsmu: Only force workload setup on init
Nikolay Kuratov <kniv(a)yandex-team.ru>
drm/vmwgfx: Handle surface check failure correctly
Ville Syrjälä <ville.syrjala(a)linux.intel.com>
drm/radeon: Fix encoder->possible_clones
Seunghwan Baek <sh8267.baek(a)samsung.com>
scsi: ufs: core: Set SDEV_OFFLINE when UFS is shut down
Jens Axboe <axboe(a)kernel.dk>
io_uring/sqpoll: close race on waiting for sqring entries
Omar Sandoval <osandov(a)fb.com>
blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race
Johannes Wikner <kwikner(a)ethz.ch>
x86/bugs: Do not use UNTRAIN_RET with IBPB on entry
Johannes Wikner <kwikner(a)ethz.ch>
x86/bugs: Skip RSB fill at VMEXIT
Johannes Wikner <kwikner(a)ethz.ch>
x86/entry: Have entry_ibpb() invalidate return predictions
Johannes Wikner <kwikner(a)ethz.ch>
x86/cpufeatures: Add a IBPB_NO_RET BUG flag
Jim Mattson <jmattson(a)google.com>
x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
Michael Mueller <mimu(a)linux.ibm.com>
KVM: s390: Change virtual to physical address access in diag 0x258 handler
Nico Boehr <nrb(a)linux.ibm.com>
KVM: s390: gaccess: Check if guest address is in memslot
Thomas Weißschuh <thomas.weissschuh(a)linutronix.de>
s390/sclp_vt220: Convert newlines to CRLF instead of LFCR
Thomas Weißschuh <thomas.weissschuh(a)linutronix.de>
s390/sclp: Deactivate sclp after all its users
Lu Baolu <baolu.lu(a)linux.intel.com>
iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices
Wachowski, Karol <karol.wachowski(a)intel.com>
drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
Lorenzo Stoakes <lorenzo.stoakes(a)oracle.com>
maple_tree: correct tree corruption on spanning store
Jakub Kicinski <kuba(a)kernel.org>
devlink: bump the instance index directly when iterating
Jakub Kicinski <kuba(a)kernel.org>
devlink: drop the filter argument from devlinks_xa_find_get
Liu Shixin <liushixin2(a)huawei.com>
mm/swapfile: skip HugeTLB pages for unuse_vma
OGAWA Hirofumi <hirofumi(a)mail.parknet.co.jp>
fat: fix uninitialized variable
Nianyao Tang <tangnianyao(a)huawei.com>
irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.1
Oleksij Rempel <linux(a)rempel-privat.de>
net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY
Mark Rutland <mark.rutland(a)arm.com>
arm64: probes: Fix simulate_ldr*_literal()
Mark Rutland <mark.rutland(a)arm.com>
arm64: probes: Remove broken LDR (literal) uprobe support
Jinjie Ruan <ruanjinjie(a)huawei.com>
posix-clock: Fix missing timespec64 check in pc_clock_settime()
Wei Fang <wei.fang(a)nxp.com>
net: enetc: add missing static descriptor and inline keyword
Wei Fang <wei.fang(a)nxp.com>
net: enetc: remove xdp_drops statistic from enetc_xdp_drop()
Jan Kara <jack(a)suse.cz>
udf: Don't return bh from udf_expand_dir_adinicb()
Jan Kara <jack(a)suse.cz>
udf: Handle error when expanding directory
Jan Kara <jack(a)suse.cz>
udf: Remove old directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_link() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_mkdir() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_add_nondir() to new directory iteration
Jan Kara <jack(a)suse.cz>
udf: Implement adding of dir entries using new iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_unlink() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_rmdir() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert empty_dir() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_get_parent() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_lookup() to use new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Convert udf_readdir() to new directory iteration
Jan Kara <jack(a)suse.cz>
udf: Convert udf_rename() to new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Provide function to mark entry as deleted using new directory iteration code
Jan Kara <jack(a)suse.cz>
udf: Implement searching for directory entry using new iteration code
Jan Kara <jack(a)suse.cz>
udf: Move udf_expand_dir_adinicb() to its callsite
Jan Kara <jack(a)suse.cz>
udf: Convert udf_expand_dir_adinicb() to new directory iteration
Jan Kara <jack(a)suse.cz>
udf: New directory iteration code
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: pm: fix UaF read in mptcp_pm_nl_rm_addr_or_subflow
Vasiliy Kovalev <kovalev(a)altlinux.org>
ALSA: hda/conexant - Fix audio routing for HP EliteOne 1000 G2
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix user-after-free from session log off
Roi Martin <jroi.martin(a)gmail.com>
btrfs: fix uninitialized pointer free on read_alloc_one_name() error
Roi Martin <jroi.martin(a)gmail.com>
btrfs: fix uninitialized pointer free in add_inode_ref()
-------------
Diffstat:
Makefile | 4 +-
arch/arm64/kernel/probes/decode-insn.c | 16 +-
arch/arm64/kernel/probes/simulate-insn.c | 18 +-
arch/s390/kvm/diag.c | 2 +-
arch/s390/kvm/gaccess.c | 4 +
arch/s390/kvm/gaccess.h | 14 +-
arch/x86/entry/entry.S | 5 +
arch/x86/entry/entry_32.S | 6 +-
arch/x86/include/asm/cpufeatures.h | 4 +-
arch/x86/kernel/apic/apic.c | 14 +-
arch/x86/kernel/cpu/bugs.c | 32 +
arch/x86/kernel/cpu/common.c | 3 +
arch/x86/kernel/cpu/resctrl/core.c | 4 +-
block/blk-rq-qos.c | 2 +-
drivers/bluetooth/btusb.c | 13 +-
drivers/crypto/vmx/Makefile | 12 +-
drivers/crypto/vmx/ppc-xlate.pl | 10 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 3 +
drivers/gpu/drm/radeon/radeon_encoders.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 +
drivers/iio/adc/Kconfig | 4 +
drivers/iio/amplifiers/Kconfig | 1 +
.../iio/common/hid-sensors/hid-sensor-trigger.c | 2 +-
drivers/iio/dac/Kconfig | 7 +
drivers/iio/light/opt3001.c | 4 +
drivers/iio/light/veml6030.c | 5 +-
drivers/iio/proximity/Kconfig | 2 +
drivers/iommu/intel/iommu.c | 4 +-
drivers/irqchip/irq-gic-v3-its.c | 26 +-
drivers/irqchip/irq-sifive-plic.c | 21 +-
drivers/net/ethernet/cadence/macb_main.c | 14 +-
drivers/net/ethernet/freescale/enetc/enetc.c | 2 +-
drivers/parport/procfs.c | 22 +-
drivers/pinctrl/pinctrl-apple-gpio.c | 3 +
drivers/pinctrl/pinctrl-ocelot.c | 8 +-
drivers/s390/char/sclp.c | 3 +-
drivers/s390/char/sclp_vt220.c | 4 +-
drivers/tty/n_gsm.c | 2 +
drivers/ufs/core/ufshcd.c | 4 +-
drivers/usb/dwc3/gadget.c | 10 +-
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/host/xhci.h | 2 +-
drivers/usb/serial/option.c | 8 +
fs/btrfs/tree-log.c | 6 +-
fs/fat/namei_vfat.c | 2 +-
fs/nilfs2/dir.c | 50 +-
fs/nilfs2/namei.c | 39 +-
fs/nilfs2/nilfs.h | 2 +-
fs/smb/server/mgmt/user_session.c | 26 +-
fs/smb/server/mgmt/user_session.h | 4 +
fs/smb/server/server.c | 2 +
fs/smb/server/smb2pdu.c | 8 +-
fs/udf/dir.c | 148 +--
fs/udf/directory.c | 594 ++++++++---
fs/udf/inode.c | 90 --
fs/udf/namei.c | 1037 +++++++-------------
fs/udf/udfdecl.h | 45 +-
include/linux/fsl/enetc_mdio.h | 3 +-
include/linux/irqchip/arm-gic-v4.h | 4 +-
io_uring/io_uring.h | 9 +-
kernel/time/posix-clock.c | 3 +
lib/maple_tree.c | 12 +-
mm/swapfile.c | 2 +-
net/bluetooth/af_bluetooth.c | 3 +
net/bluetooth/iso.c | 6 +-
net/devlink/leftover.c | 40 +-
net/ipv4/tcp_output.c | 4 +-
net/mptcp/mib.c | 1 +
net/mptcp/mib.h | 1 +
net/mptcp/pm_netlink.c | 3 +-
net/mptcp/protocol.h | 1 +
net/mptcp/subflow.c | 11 +
sound/pci/hda/patch_conexant.c | 19 +
75 files changed, 1237 insertions(+), 1275 deletions(-)
From: Chris Wilson <chris.p.wilson(a)intel.com>
commit 78a033433a5ae4fee85511ee075bc9a48312c79e upstream.
If we abort driver initialisation in the middle of gt/engine discovery,
some engines will be fully setup and some not. Those incompletely setup
engines only have 'engine->release == NULL' and so will leak any of the
common objects allocated.
v2:
- Drop the destroy_pinned_context() helper for now. It's not really
worth it with just a single callsite at the moment. (Janusz)
Signed-off-by: Chris Wilson <chris.p.wilson(a)intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper(a)intel.com>
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-2-matt…
Cc: <stable(a)vger.kernel.org> # 5.10+
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index a19537706ed1..eb6f4d7f1e34 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -904,8 +904,13 @@ int intel_engines_init(struct intel_gt *gt)
return err;
err = setup(engine);
- if (err)
+ if (err) {
+ intel_engine_cleanup_common(engine);
return err;
+ }
+
+ /* The backend should now be responsible for cleanup */
+ GEM_BUG_ON(engine->release == NULL);
err = engine_init_common(engine);
if (err)
--
2.34.1