Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
5e47099
KVM: x86: Fix shadow paging use-after-free due to unexpected role
bonzini Jun 26, 2026
5dfcb15
lsm: add backing_file LSM hooks
pcmoore Jun 26, 2026
d844702
selinux: fix overlayfs mmap() and mprotect() access checks
pcmoore Jun 26, 2026
671ec2e
Revert "PCI: qcom: Advertise Hotplug Slot Capability with no Command …
Jun 27, 2026
e055e74
lockd: fix TEST handling when not all permissions are available.
neilbrown Jun 26, 2026
1c5a126
batman-adv: tp_meter: keep unacked list in ascending ordered
ecsv Jun 26, 2026
696c4ca
batman-adv: tp_meter: initialize dup_acks explicitly
ecsv Jun 26, 2026
7cb88d9
batman-adv: tp_meter: initialize dec_cwnd explicitly
ecsv Jun 26, 2026
8e77fe0
batman-adv: tp_meter: avoid window underflow
ecsv Jun 26, 2026
7d2a44b
batman-adv: tp_meter: avoid divide-by-zero for dec_cwnd
ecsv Jun 26, 2026
1db02f3
batman-adv: tp_meter: fix fast recovery precondition
ecsv Jun 26, 2026
b8bf840
batman-adv: tp_meter: handle seqno wrap-around for fast recovery dete…
ecsv Jun 26, 2026
23d085b
batman-adv: tp_meter: add only finished tp_vars to lists
ecsv Jun 26, 2026
43733e5
batman-adv: bla: annotate lasttime access with READ/WRITE_ONCE
ecsv Jun 26, 2026
75612c1
batman-adv: prevent ELP transmission interval underflow
ecsv Jun 26, 2026
95a061f
batman-adv: tp_meter: initialize last_recv_time during init
ecsv Jun 26, 2026
646b686
batman-adv: gw: don't deselect gateway with active hardif
ecsv Jun 26, 2026
49bf27f
batman-adv: ensure bcast is writable before modifying TTL
ecsv Jun 26, 2026
0473ae8
batman-adv: fix (m|b)cast csum after decrementing TTL
ecsv Jun 26, 2026
116e940
batman-adv: frag: ensure fragment is writable before modifying TTL
ecsv Jun 26, 2026
44ae137
batman-adv: frag: avoid underflow of TTL
ecsv Jun 26, 2026
3d4548c
batman-adv: v: prevent OGM aggregation on disabled hardif
ecsv Jun 26, 2026
2233787
batman-adv: tp_meter: restrict number of unacked list entries
ecsv Jun 26, 2026
1dafdd0
batman-adv: tp_meter: annotate last_recv_time access with READ/WRITE_…
ecsv Jun 26, 2026
d511c72
batman-adv: tp_meter: prevent parallel modifications of last_recv
ecsv Jun 26, 2026
af5a069
batman-adv: tp_meter: handle overlapping packets
ecsv Jun 26, 2026
3470d58
batman-adv: tt: don't merge change entries with different VIDs
ecsv Jun 26, 2026
3f82fc9
batman-adv: tt: track roam count per VID
ecsv Jun 26, 2026
04e1a65
batman-adv: dat: prevent false sharing between VLANs
ecsv Jun 26, 2026
4cc9f77
batman-adv: tvlv: enforce 2-byte alignment
ecsv Jun 26, 2026
565ab66
batman-adv: tvlv: avoid race of cifsnotfound handler state
ecsv Jun 26, 2026
6374fb9
ipv6: account for fraggap on the paged allocation path
qwerty-po Jun 16, 2026
77798d7
ipv4: account for fraggap on the paged allocation path
qwerty-po Jun 16, 2026
5e658b9
ntfs3: reject direct userspace writes to reserved $LX* xattrs
aalexandrovich Jun 10, 2026
3c49985
wifi: mt76: add wcid publish check in mt76_sta_add
May 28, 2026
0cfa78c
af_unix: Set gc_in_progress to true in unix_gc().
q2ven Jul 1, 2026
bd968bd
mac802154: llsec: add skb_cow_data() before in-place crypto
peaktwilight May 26, 2026
1acdd14
net: skmsg: preserve sg.copy across SG transforms
Jun 10, 2026
1697957
net: ip_gre: require CAP_NET_ADMIN in the device netns for changelink
maoyixie Jun 12, 2026
4a69b83
apparmor: mediate the implicit connect of TCP fast open sendmsg
Jun 22, 2026
c3ca263
apparmor: fix use-after-free in rawdata dedup loop
norus May 25, 2026
81371db
NTB: epf: Avoid pci_iounmap() with offset when PEER_SPAD and CONFIG s…
Mar 4, 2026
0d35f9f
fbdev: fix use-after-free in store_modes()
Jun 26, 2026
99e6c71
kernel/fork: clear PF_BLOCK_TS in copy_process()
Jun 16, 2026
97e1044
block: invalidate cached plug timestamp after task switch
Jun 16, 2026
1fcca12
KVM: arm64: Omit tag sync on stage-2 mappings of the zero page
ardbiesheuvel Jun 4, 2026
2b7ec72
err.h: use __always_inline on all error pointer helpers
arndb May 26, 2026
49d893b
gcov: use atomic counter updates to fix concurrent access crashes
finist0 May 11, 2026
b11c1fa
KEYS: fix overflow in keyctl_pkey_params_get_2()
jarkkojs Jun 1, 2026
7216ce8
keys: Pin request_key_auth payload in instantiate paths
CsomePro Jun 10, 2026
ec1c9e8
userfaultfd: ensure mremap_userfaultfd_fail() releases mmap_changing
rppt May 13, 2026
7e25b5e
wifi: mt76: mt76x2u: Add support for ELECOM WDC-867SU3S
a5a5aa555oo Apr 7, 2026
a7cdc38
wifi: mt76: mt7925: don't disable AP BSS when removing TDLS peer
ElXreno May 6, 2026
40aa3c2
wifi: ath11k: fix warning when unbinding
jtornosm Apr 20, 2026
0aeb4d3
wifi: rtlwifi: rtl8821ae: Fix C2H bit location in RX descriptor
Apr 25, 2026
73d427d
wifi: rtw88: increase TX report timeout to fix race condition
MocLG May 18, 2026
200d58c
wifi: rtw88: usb: fix memory leaks on USB write failures
MocLG May 18, 2026
df626f2
wifi: iwlwifi: mvm: fix race condition in PTP removal
Junjie650 Feb 12, 2026
b0b07e0
wifi: iwlwifi: mld: fix race condition in PTP removal
Junjie650 Feb 12, 2026
1de9278
wifi: iwlwifi: mld: validate sta_mask before ffs() in BA session hand…
avasummer Apr 2, 2026
1e48fef
f2fs: pass correct iostat type for single node writes
WenjieQiHUST May 20, 2026
8aad547
f2fs: validate orphan inode entry count
WenjieQiHUST May 26, 2026
77f216f
f2fs: validate compress cache inode only when enabled
WenjieQiHUST May 21, 2026
888d94c
f2fs: fix to round down start offset of fallocate for pin file
Jun 22, 2026
ff83de5
f2fs: validate ACL entry sizes in f2fs_acl_from_disk()
Jun 15, 2026
20190e4
f2fs: fix incorrect FI_NO_EXTENT handling in __destroy_extent_node()
Apr 27, 2026
db2c5b9
f2fs: keep atomic write retry from zeroing original data
WenjieQiHUST May 27, 2026
3804e6d
block: Avoid mounting the bdev pseudo-filesystem in userspace
May 21, 2026
65bd0c0
bpf: use kvfree() for replaced sysctl write buffer
Jun 3, 2026
6e61fc2
MIPS: DEC: Prevent initial console buffer from landing in XKPHYS
maciej-w-rozycki May 6, 2026
adfacfb
exfat: fix potential use-after-free in exfat_find_dir_entry()
mjbommar Apr 22, 2026
18587f9
KVM: x86/mmu: Ensure hugepage is in by slot before checking max mappi…
sean-jc Apr 29, 2026
5da9b1a
KVM: Replace guest-triggerable BUG_ON() in ioeventfd datamatch with g…
sean-jc Jun 12, 2026
8d8507a
crypto: nx - fix nx_crypto_ctx_exit argument
thesamesam May 25, 2026
b85ef03
gfs2: fix use-after-free in gfs2_qd_dealloc
May 1, 2026
e91df6d
pwrseq: core: fix use-after-free in pwrseq_debugfs_seq_next()
ISCAS-Vulab Jun 16, 2026
5a84398
hdlc_ppp: sync per-proto timers before freeing hdlc state
Jun 17, 2026
5e5b7f2
blk-cgroup: fix UAF in __blkcg_rstat_flush()
Werkov Feb 5, 2026
e187696
tipc: fix slab-use-after-free Read in tipc_aead_decrypt_done
peaktwilight Jun 17, 2026
90e254f
LoongArch: Report dying CPU to RCU in stop_this_cpu()
chenhuacai Jun 25, 2026
200e763
pNFS: Fix use-after-free in pnfs_update_layout()
ISCAS-Vulab May 18, 2026
b3a3831
irqchip/imgpdc: Fix resource leak, add missing chained handler cleanu…
Jun 18, 2026
369496d
fpga: region: fix use-after-free in child_regions_with_firmware()
ISCAS-Vulab Apr 8, 2026
104d100
rpmsg: char: Fix use-after-free on probe error path
Uuuuuuho Jun 1, 2026
4cd57eb
ocfs2: reject oversized group bitmap descriptors
May 24, 2026
6dbe944
9p: avoid putting oldfid in p9_client_walk() error path
ArtisticFantasy May 28, 2026
f9b57a0
MIPS: smp: report dying CPU to RCU in stop_this_cpu()
jonasjelonek Jun 8, 2026
e36095d
KVM: x86: hyper-v: Bound the bank index when querying sparse banks
V4bel Jun 6, 2026
720949e
KVM: SVM: Fix page overflow in sev_dbg_crypt() for ENCRYPT path
geeky-ashu May 1, 2026
2205275
power: reset: linkstation-poweroff: fix use-after-free in the linksta…
ISCAS-Vulab Apr 7, 2026
3b33dbb
riscv: mm: Extract helper mark_new_valid_map()
dramforever Mar 3, 2026
7643e56
riscv: kfence: Call mark_new_valid_map() for kfence_unprotect()
dramforever Mar 3, 2026
eea16b6
fbdev: Fix fb_new_modelist to prevent null-ptr-deref in fb_videomode_…
Jun 25, 2026
4d418cf
fbdev: modedb: fix a possible UAF in fb_find_mode()
lituo1996 Jun 10, 2026
fc6aa9b
fbdev: modedb: Fix misaligned fields in the 1920x1080-60 mode
spersvold Jun 12, 2026
6a94603
i2c: core: fix adapter registration race
jhovold May 11, 2026
c8a24ef
NFSD: Fix SECINFO_NO_NAME decode error cleanup
keenanwgn May 21, 2026
136b416
nfsd: fix posix_acl leak on SETACL decode failure
jtlayton May 21, 2026
dba7da4
nfsd: fix inverted cp_ttl check in async copy reaper
jtlayton May 21, 2026
0f28337
nfsd: check get_user() return when reading princhashlen
glivter May 21, 2026
017a615
nfsd: avoid leaking pre-allocated openowner on unconfirmed retry race
jtlayton May 22, 2026
4367afc
nfsd: reset write verifier on deferred writeback errors
jtlayton May 22, 2026
d8c90c7
NFSv4/flexfiles: reject zero filehandle version count
mjbommar May 13, 2026
012d37a
NFSv4/pNFS: reject zero-length r_addr in nfs4_decode_mp_ds_addr
mjbommar May 27, 2026
6919eb5
NFSv4: clear exception state on successful mkdir retry
igor-raits Apr 29, 2026
62c2672
NFS: Prevent resource leak in nfs_alloc_server()
elfring Jun 14, 2026
7627ff8
ksmbd: fix out-of-bounds read in smb_check_perm_dacl()
Hem1700 Jun 2, 2026
3d205fe
serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails
root3315 May 14, 2026
e77fbef
net/tcp-ao: fix use-after-free of key in del_async path
AlexNova-ops Jun 23, 2026
92c63a5
apparmor: advertise the tcp fast open fix is applied
jrjohansen Jun 22, 2026
e46dc0a
Linux 6.18.38
gregkh Jul 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 18
SUBLEVEL = 37
SUBLEVEL = 38
EXTRAVERSION =
NAME = Baby Opossum Posse

Expand Down Expand Up @@ -806,12 +806,6 @@ endif # KBUILD_EXTMOD
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux

CFLAGS_GCOV := -fprofile-arcs -ftest-coverage
ifdef CONFIG_CC_IS_GCC
CFLAGS_GCOV += -fno-tree-loop-im
endif
export CFLAGS_GCOV

# The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
ifdef CONFIG_FUNCTION_TRACER
CC_FLAGS_FTRACE := -pg
Expand Down Expand Up @@ -1082,6 +1076,27 @@ endif
# Ensure compilers do not transform certain loops into calls to wcslen()
KBUILD_CFLAGS += -fno-builtin-wcslen

CFLAGS_GCOV := -fprofile-arcs -ftest-coverage
ifdef CONFIG_CC_IS_GCC
CFLAGS_GCOV += -fno-tree-loop-im
# Use atomic counter updates to avoid concurrent-access crashes in GCOV.
# Only enable if -fprofile-update=prefer-atomic does not introduce new
# undefined symbols (e.g. libatomic calls that the kernel cannot link).
CFLAGS_GCOV += $(call try-run,\
echo 'long long x; void f(void){x++;}' | \
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w -fprofile-arcs \
-ftest-coverage -x c - -c -o "$$TMP.base" && \
echo 'long long x; void f(void){x++;}' | \
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w -fprofile-arcs \
-ftest-coverage -fprofile-update=prefer-atomic \
-x c - -c -o "$$TMP" && \
$(NM) "$$TMP.base" | grep ' U ' > "$$TMP.ubase" || true ; \
$(NM) "$$TMP" | grep ' U ' > "$$TMP.utest" || true ; \
cmp -s "$$TMP.ubase" "$$TMP.utest",\
-fprofile-update=prefer-atomic)
endif
export CFLAGS_GCOV

# change __FILE__ to the relative path to the source directory
ifdef building_out_of_srctree
KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srcroot)/=)
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,11 @@ static void sanitise_mte_tags(struct kvm *kvm, kvm_pfn_t pfn,
if (!kvm_has_mte(kvm))
return;

if (is_zero_pfn(pfn)) {
WARN_ON_ONCE(nr_pages != 1);
return;
}

if (folio_test_hugetlb(folio)) {
/* Hugetlb has MTE flags set on head page only */
if (folio_try_hugetlb_mte_tagging(folio)) {
Expand Down
1 change: 1 addition & 0 deletions arch/loongarch/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ static void stop_this_cpu(void *dummy)
set_cpu_online(smp_processor_id(), false);
calculate_cpu_foreign_map();
local_irq_disable();
rcutree_report_cpu_dead();
while (true);
}

Expand Down
7 changes: 5 additions & 2 deletions arch/mips/dec/prom/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
/*
* DECstation PROM-based early console support.
*
* Copyright (C) 2004, 2007 Maciej W. Rozycki
* Copyright (C) 2004, 2007, 2026 Maciej W. Rozycki
*/
#include <linux/bug.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/kernel.h>
Expand All @@ -14,9 +15,11 @@
static void __init prom_console_write(struct console *con, const char *s,
unsigned int c)
{
char buf[81];
static char buf[81] __initdata = { 0 };
unsigned int chunk = sizeof(buf) - 1;

BUG_ON((long)buf != (int)(long)buf);

while (c > 0) {
if (chunk > c)
chunk = c;
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/sched/mm.h>
#include <linux/cpumask.h>
#include <linux/cpu.h>
#include <linux/rcupdate.h>
#include <linux/err.h>
#include <linux/ftrace.h>
#include <linux/irqdomain.h>
Expand Down Expand Up @@ -422,6 +423,7 @@ static void stop_this_cpu(void *dummy)
set_cpu_online(smp_processor_id(), false);
calculate_cpu_foreign_map();
local_irq_disable();
rcutree_report_cpu_dead();
while (1);
}

Expand Down
25 changes: 14 additions & 11 deletions arch/riscv/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,23 @@ do { \
#ifdef CONFIG_64BIT
extern u64 new_vmalloc[NR_CPUS / sizeof(u64) + 1];
extern char _end[];
static inline void mark_new_valid_map(void)
{
int i;

/*
* We don't care if concurrently a cpu resets this value since
* the only place this can happen is in handle_exception() where
* an sfence.vma is emitted.
*/
for (i = 0; i < ARRAY_SIZE(new_vmalloc); ++i)
new_vmalloc[i] = -1ULL;
}
#define flush_cache_vmap flush_cache_vmap
static inline void flush_cache_vmap(unsigned long start, unsigned long end)
{
if (is_vmalloc_or_module_addr((void *)start)) {
int i;

/*
* We don't care if concurrently a cpu resets this value since
* the only place this can happen is in handle_exception() where
* an sfence.vma is emitted.
*/
for (i = 0; i < ARRAY_SIZE(new_vmalloc); ++i)
new_vmalloc[i] = -1ULL;
}
if (is_vmalloc_or_module_addr((void *)start))
mark_new_valid_map();
}
#define flush_cache_vmap_early(start, end) local_flush_tlb_kernel_range(start, end)
#endif
Expand Down
7 changes: 5 additions & 2 deletions arch/riscv/include/asm/kfence.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <linux/kfence.h>
#include <linux/pfn.h>
#include <asm-generic/pgalloc.h>
#include <asm/cacheflush.h>
#include <asm/pgtable.h>

static inline bool arch_kfence_init_pool(void)
Expand All @@ -17,10 +18,12 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
{
pte_t *pte = virt_to_kpte(addr);

if (protect)
if (protect) {
set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~_PAGE_PRESENT));
else
} else {
set_pte(pte, __pte(pte_val(ptep_get(pte)) | _PAGE_PRESENT));
mark_new_valid_map();
}

preempt_disable();
local_flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
Expand Down
6 changes: 4 additions & 2 deletions arch/riscv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ SYM_CODE_START(handle_exception)

#ifdef CONFIG_64BIT
/*
* The RISC-V kernel does not eagerly emit a sfence.vma after each
* new vmalloc mapping, which may result in exceptions:
* The RISC-V kernel does not flush TLBs on all CPUS after each new
* vmalloc mapping or kfence_unprotect(), which may result in
* exceptions:
*
* - if the uarch caches invalid entries, the new mapping would not be
* observed by the page table walker and an invalidation is needed.
* - if the uarch does not cache invalid entries, a reordered access
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/kvm/hyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,11 @@ static bool hv_is_vp_in_sparse_set(u32 vp_id, u64 valid_bank_mask, u64 sparse_ba
int valid_bit_nr = vp_id / HV_VCPUS_PER_SPARSE_BANK;
unsigned long sbank;

BUILD_BUG_ON(BITS_PER_TYPE(valid_bank_mask) != HV_MAX_SPARSE_VCPU_BANKS);

if (valid_bit_nr >= HV_MAX_SPARSE_VCPU_BANKS)
return false;

if (!test_bit(valid_bit_nr, (unsigned long *)&valid_bank_mask))
return false;

Expand Down
28 changes: 18 additions & 10 deletions arch/x86/kvm/mmu/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2453,13 +2453,15 @@ static struct kvm_mmu_page *kvm_mmu_get_child_sp(struct kvm_vcpu *vcpu,
u64 *sptep, gfn_t gfn,
bool direct, unsigned int access)
{
union kvm_mmu_page_role role;
union kvm_mmu_page_role role = kvm_mmu_child_role(sptep, direct, access);

if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
if (is_shadow_present_pte(*sptep) &&
!is_large_pte(*sptep) &&
spte_to_child_sp(*sptep) &&
spte_to_child_sp(*sptep)->gfn == gfn &&
spte_to_child_sp(*sptep)->role.word == role.word)
return ERR_PTR(-EEXIST);

role = kvm_mmu_child_role(sptep, direct, access);
return kvm_mmu_get_shadow_page(vcpu, gfn, role);
}

Expand Down Expand Up @@ -7179,13 +7181,19 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm *kvm,
sp = sptep_to_sp(sptep);

/*
* We cannot do huge page mapping for indirect shadow pages,
* which are found on the last rmap (level = 1) when not using
* tdp; such shadow pages are synced with the page table in
* the guest, and the guest page table is using 4K page size
* mapping if the indirect sp has level = 1.
* Direct shadow page can be replaced by a hugepage if the host
* mapping level allows it and the memslot maps all of the host
* hugepage. Note! If the memslot maps only part of the
* hugepage, sp->gfn may be below slot->base_gfn, and querying
* the max mapping level would cause an out-of-bounds lpage_info
* access. So the gfn bounds check *must* be done first.
*
* Indirect shadow pages are created when the guest page tables
* are using 4K pages. Since the host mapping is always
* constrained by the page size in the guest, indirect shadow
* pages are never collapsible.
*/
if (sp->role.direct &&
if (sp->role.direct && is_gfn_in_memslot(slot, sp->gfn) &&
sp->role.level < kvm_mmu_max_mapping_level(kvm, NULL, slot, sp->gfn)) {
kvm_zap_one_rmap_spte(kvm, rmap_head, sptep);

Expand Down
1 change: 1 addition & 0 deletions arch/x86/kvm/svm/sev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ static int sev_dbg_crypt(struct kvm *kvm, struct kvm_sev_cmd *argp, bool dec)
s_off = vaddr & ~PAGE_MASK;
d_off = dst_vaddr & ~PAGE_MASK;
len = min_t(size_t, (PAGE_SIZE - s_off), size);
len = min_t(size_t, len, PAGE_SIZE - d_off);

if (dec)
ret = __sev_dbg_decrypt_user(kvm,
Expand Down
5 changes: 0 additions & 5 deletions block/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,10 @@ EXPORT_SYMBOL_GPL(blockdev_superblock);

void __init bdev_cache_init(void)
{
int err;

bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
SLAB_ACCOUNT|SLAB_PANIC),
init_once);
err = register_filesystem(&bd_type);
if (err)
panic("Cannot register bdev pseudo-fs");
blockdev_mnt = kern_mount(&bd_type);
if (IS_ERR(blockdev_mnt))
panic("Cannot create bdev pseudo-fs");
Expand Down
21 changes: 11 additions & 10 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,10 @@ static void blkg_free(struct blkcg_gq *blkg)
static void __blkg_release(struct rcu_head *rcu)
{
struct blkcg_gq *blkg = container_of(rcu, struct blkcg_gq, rcu_head);
struct blkcg *blkcg = blkg->blkcg;
int cpu;

#ifdef CONFIG_BLK_CGROUP_PUNT_BIO
WARN_ON(!bio_list_empty(&blkg->async_bios));
#endif
/*
* Flush all the non-empty percpu lockless lists before releasing
* us, given these stat belongs to us.
*
* blkg_stat_lock is for serializing blkg stat update
*/
for_each_possible_cpu(cpu)
__blkcg_rstat_flush(blkcg, cpu);

/* release the blkcg and parent blkg refs this blkg has been holding */
css_put(&blkg->blkcg->css);
Expand All @@ -195,6 +185,17 @@ static void __blkg_release(struct rcu_head *rcu)
static void blkg_release(struct percpu_ref *ref)
{
struct blkcg_gq *blkg = container_of(ref, struct blkcg_gq, refcnt);
struct blkcg *blkcg = blkg->blkcg;
int cpu;

/*
* Flush all the non-empty percpu lockless lists before releasing
* us, given these stat belongs to us.
*
* blkg_stat_lock is for serializing blkg stat update
*/
for_each_possible_cpu(cpu)
__blkcg_rstat_flush(blkcg, cpu);

call_rcu(&blkg->rcu_head, __blkg_release);
}
Expand Down
6 changes: 2 additions & 4 deletions drivers/crypto/nx/nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,13 @@ int nx_crypto_ctx_aes_xcbc_init(struct crypto_shash *tfm)
/**
* nx_crypto_ctx_exit - destroy a crypto api context
*
* @tfm: the crypto transform pointer for the context
* @nx_ctx: the crypto api context
*
* As crypto API contexts are destroyed, this exit hook is called to free the
* memory associated with it.
*/
void nx_crypto_ctx_exit(struct crypto_tfm *tfm)
void nx_crypto_ctx_exit(struct nx_crypto_ctx *nx_ctx)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm);

kfree_sensitive(nx_ctx->kmem);
nx_ctx->csbcpb = NULL;
nx_ctx->csbcpb_aead = NULL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/nx/nx.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int nx_crypto_ctx_aes_ctr_init(struct crypto_skcipher *tfm);
int nx_crypto_ctx_aes_cbc_init(struct crypto_skcipher *tfm);
int nx_crypto_ctx_aes_ecb_init(struct crypto_skcipher *tfm);
int nx_crypto_ctx_sha_init(struct crypto_shash *tfm);
void nx_crypto_ctx_exit(struct crypto_tfm *tfm);
void nx_crypto_ctx_exit(struct nx_crypto_ctx *nx_ctx);
void nx_crypto_ctx_skcipher_exit(struct crypto_skcipher *tfm);
void nx_crypto_ctx_aead_exit(struct crypto_aead *tfm);
void nx_crypto_ctx_shash_exit(struct crypto_shash *tfm);
Expand Down
3 changes: 1 addition & 2 deletions drivers/fpga/of-fpga-region.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,10 @@ static int child_regions_with_firmware(struct device_node *overlay)
fpga_region_of_match);
}

of_node_put(child_region);

if (ret)
pr_err("firmware-name not allowed in child FPGA region: %pOF",
child_region);
of_node_put(child_region);

return ret;
}
Expand Down
8 changes: 6 additions & 2 deletions drivers/i2c/i2c-core-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,10 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
pm_suspend_ignore_children(&adap->dev, true);
pm_runtime_enable(&adap->dev);

mutex_lock(&core_lock);
idr_replace(&i2c_adapter_idr, adap, adap->nr);
mutex_unlock(&core_lock);

res = device_add(&adap->dev);
if (res) {
pr_err("adapter '%s': can't register device (%d)\n", adap->name, res);
Expand Down Expand Up @@ -1628,7 +1632,7 @@ static int __i2c_add_numbered_adapter(struct i2c_adapter *adap)
int id;

mutex_lock(&core_lock);
id = idr_alloc(&i2c_adapter_idr, adap, adap->nr, adap->nr + 1, GFP_KERNEL);
id = idr_alloc(&i2c_adapter_idr, NULL, adap->nr, adap->nr + 1, GFP_KERNEL);
mutex_unlock(&core_lock);
if (WARN(id < 0, "couldn't get idr"))
return id == -ENOSPC ? -EBUSY : id;
Expand Down Expand Up @@ -1662,7 +1666,7 @@ int i2c_add_adapter(struct i2c_adapter *adapter)
}

mutex_lock(&core_lock);
id = idr_alloc(&i2c_adapter_idr, adapter,
id = idr_alloc(&i2c_adapter_idr, NULL,
__i2c_first_dynamic_bus_num, 0, GFP_KERNEL);
mutex_unlock(&core_lock);
if (WARN(id < 0, "couldn't get idr"))
Expand Down
6 changes: 6 additions & 0 deletions drivers/irqchip/irq-imgpdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "cannot add IRQ domain\n");
return -ENOMEM;
}
priv->domain->flags |= IRQ_DOMAIN_FLAG_DESTROY_GC;

/*
* Set up 2 generic irq chips with 2 chip types.
Expand Down Expand Up @@ -465,6 +466,11 @@ static void pdc_intc_remove(struct platform_device *pdev)
{
struct pdc_intc_priv *priv = platform_get_drvdata(pdev);

for (unsigned int i = 0; i < priv->nr_perips; ++i)
irq_set_chained_handler_and_data(priv->perip_irqs[i], NULL, NULL);

irq_set_chained_handler_and_data(priv->syswake_irq, NULL, NULL);

irq_domain_remove(priv->domain);
}

Expand Down
Loading