Skip to content

Commit 7b0acd9

Browse files
committed
Merge tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc hotfixes from Andrew Morton: "11 hotfixes, 7 of which are cc:stable. 7 are MM, 4 are other" * tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: nilfs2: handle inconsistent state in nilfs_btnode_create_block() selftests/mm: skip test for non-LPA2 and non-LVA systems mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist() mm: memcg: add cacheline padding after lruvec in mem_cgroup_per_node alloc_tag: outline and export free_reserved_page() decompress_bunzip2: fix rare decompression failure mm/huge_memory: avoid PMD-size page cache if needed mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines mm: fix old/young bit handling in the faulting path dt-bindings: arm: update James Clark's email address MAINTAINERS: mailmap: update James Clark's email address
2 parents 5256184 + 4811f7a commit 7b0acd9

File tree

14 files changed

+95
-42
lines changed

14 files changed

+95
-42
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@motorola.com>
260260
Jakub Kicinski <kuba@kernel.org> <jakub.kicinski@netronome.com>
261261
James Bottomley <jejb@mulgrave.(none)>
262262
James Bottomley <jejb@titanic.il.steeleye.com>
263+
James Clark <james.clark@linaro.org> <james.clark@arm.com>
263264
James E Wilson <wilson@specifix.com>
264265
James Hogan <jhogan@kernel.org> <james@albanarts.com>
265266
James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>

Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ description: |
3030
maintainers:
3131
- Mike Leach <mike.leach@linaro.org>
3232
- Suzuki K Poulose <suzuki.poulose@arm.com>
33-
- James Clark <james.clark@arm.com>
33+
- James Clark <james.clark@linaro.org>
3434
- Mao Jinlong <quic_jinlmao@quicinc.com>
3535
- Hao Zhang <quic_hazha@quicinc.com>
3636

Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ description: |
2929
maintainers:
3030
- Mike Leach <mike.leach@linaro.org>
3131
- Suzuki K Poulose <suzuki.poulose@arm.com>
32-
- James Clark <james.clark@arm.com>
32+
- James Clark <james.clark@linaro.org>
3333
- Mao Jinlong <quic_jinlmao@quicinc.com>
3434
- Hao Zhang <quic_hazha@quicinc.com>
3535

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ N: digicolor
21962196
ARM/CORESIGHT FRAMEWORK AND DRIVERS
21972197
M: Suzuki K Poulose <suzuki.poulose@arm.com>
21982198
R: Mike Leach <mike.leach@linaro.org>
2199-
R: James Clark <james.clark@arm.com>
2199+
R: James Clark <james.clark@linaro.org>
22002200
L: coresight@lists.linaro.org (moderated for non-subscribers)
22012201
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
22022202
S: Maintained
@@ -17894,7 +17894,7 @@ F: tools/perf/
1789417894
PERFORMANCE EVENTS TOOLING ARM64
1789517895
R: John Garry <john.g.garry@oracle.com>
1789617896
R: Will Deacon <will@kernel.org>
17897-
R: James Clark <james.clark@arm.com>
17897+
R: James Clark <james.clark@linaro.org>
1789817898
R: Mike Leach <mike.leach@linaro.org>
1789917899
R: Leo Yan <leo.yan@linux.dev>
1790017900
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)

fs/nilfs2/btnode.c

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,21 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr)
5151

5252
bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node));
5353
if (unlikely(!bh))
54-
return NULL;
54+
return ERR_PTR(-ENOMEM);
5555

5656
if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) ||
5757
buffer_dirty(bh))) {
58-
brelse(bh);
59-
BUG();
58+
/*
59+
* The block buffer at the specified new address was already
60+
* in use. This can happen if it is a virtual block number
61+
* and has been reallocated due to corruption of the bitmap
62+
* used to manage its allocation state (if not, the buffer
63+
* clearing of an abandoned b-tree node is missing somewhere).
64+
*/
65+
nilfs_error(inode->i_sb,
66+
"state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
67+
(unsigned long long)blocknr, inode->i_ino);
68+
goto failed;
6069
}
6170
memset(bh->b_data, 0, i_blocksize(inode));
6271
bh->b_bdev = inode->i_sb->s_bdev;
@@ -67,6 +76,12 @@ nilfs_btnode_create_block(struct address_space *btnc, __u64 blocknr)
6776
folio_unlock(bh->b_folio);
6877
folio_put(bh->b_folio);
6978
return bh;
79+
80+
failed:
81+
folio_unlock(bh->b_folio);
82+
folio_put(bh->b_folio);
83+
brelse(bh);
84+
return ERR_PTR(-EIO);
7085
}
7186

7287
int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
@@ -217,8 +232,8 @@ int nilfs_btnode_prepare_change_key(struct address_space *btnc,
217232
}
218233

219234
nbh = nilfs_btnode_create_block(btnc, newkey);
220-
if (!nbh)
221-
return -ENOMEM;
235+
if (IS_ERR(nbh))
236+
return PTR_ERR(nbh);
222237

223238
BUG_ON(nbh == obh);
224239
ctxt->newbh = nbh;

fs/nilfs2/btree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ static int nilfs_btree_get_new_block(const struct nilfs_bmap *btree,
6363
struct buffer_head *bh;
6464

6565
bh = nilfs_btnode_create_block(btnc, ptr);
66-
if (!bh)
67-
return -ENOMEM;
66+
if (IS_ERR(bh))
67+
return PTR_ERR(bh);
6868

6969
set_buffer_nilfs_volatile(bh);
7070
*bhp = bh;

include/linux/huge_mm.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,20 @@ extern struct kobj_attribute thpsize_shmem_enabled_attr;
7474
#define THP_ORDERS_ALL_ANON ((BIT(PMD_ORDER + 1) - 1) & ~(BIT(0) | BIT(1)))
7575

7676
/*
77-
* Mask of all large folio orders supported for file THP.
77+
* Mask of all large folio orders supported for file THP. Folios in a DAX
78+
* file is never split and the MAX_PAGECACHE_ORDER limit does not apply to
79+
* it.
7880
*/
79-
#define THP_ORDERS_ALL_FILE (BIT(PMD_ORDER) | BIT(PUD_ORDER))
81+
#define THP_ORDERS_ALL_FILE_DAX \
82+
(BIT(PMD_ORDER) | BIT(PUD_ORDER))
83+
#define THP_ORDERS_ALL_FILE_DEFAULT \
84+
((BIT(MAX_PAGECACHE_ORDER + 1) - 1) & ~BIT(0))
8085

8186
/*
8287
* Mask of all large folio orders supported for THP.
8388
*/
84-
#define THP_ORDERS_ALL (THP_ORDERS_ALL_ANON | THP_ORDERS_ALL_FILE)
89+
#define THP_ORDERS_ALL \
90+
(THP_ORDERS_ALL_ANON | THP_ORDERS_ALL_FILE_DAX | THP_ORDERS_ALL_FILE_DEFAULT)
8591

8692
#define TVA_SMAPS (1 << 0) /* Will be used for procfs */
8793
#define TVA_IN_PF (1 << 1) /* Page fault handler */

include/linux/memcontrol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ struct mem_cgroup_per_node {
109109

110110
/* Fields which get updated often at the end. */
111111
struct lruvec lruvec;
112+
CACHELINE_PADDING(_pad2_);
112113
unsigned long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS];
113114
struct mem_cgroup_reclaim_iter iter;
114115
};

include/linux/mm.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,21 +3137,7 @@ extern void reserve_bootmem_region(phys_addr_t start,
31373137
phys_addr_t end, int nid);
31383138

31393139
/* Free the reserved page into the buddy system, so it gets managed. */
3140-
static inline void free_reserved_page(struct page *page)
3141-
{
3142-
if (mem_alloc_profiling_enabled()) {
3143-
union codetag_ref *ref = get_page_tag_ref(page);
3144-
3145-
if (ref) {
3146-
set_codetag_empty(ref);
3147-
put_page_tag_ref(ref);
3148-
}
3149-
}
3150-
ClearPageReserved(page);
3151-
init_page_count(page);
3152-
__free_page(page);
3153-
adjust_managed_page_count(page, 1);
3154-
}
3140+
void free_reserved_page(struct page *page);
31553141
#define free_highmem_page(page) free_reserved_page(page)
31563142

31573143
static inline void mark_page_reserved(struct page *page)

lib/decompress_bunzip2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ static int INIT get_next_block(struct bunzip_data *bd)
232232
RUNB) */
233233
symCount = symTotal+2;
234234
for (j = 0; j < groupCount; j++) {
235-
unsigned char length[MAX_SYMBOLS], temp[MAX_HUFCODE_BITS+1];
235+
unsigned char length[MAX_SYMBOLS];
236+
unsigned short temp[MAX_HUFCODE_BITS+1];
236237
int minLen, maxLen, pp;
237238
/* Read Huffman code lengths for each symbol. They're
238239
stored in a way similar to mtf; record a starting

0 commit comments

Comments
 (0)