Commit 8b789f2b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mm-hotfixes-stable-2025-09-17-21-10' of...

Merge tag 'mm-hotfixes-stable-2025-09-17-21-10' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "15 hotfixes. 11 are cc:stable and the remainder address post-6.16
  issues or aren't considered necessary for -stable kernels. 13 of these
  fixes are for MM.

  The usual shower of singletons, plus

   - fixes from Hugh to address various misbehaviors in get_user_pages()

   - patches from SeongJae to address a quite severe issue in DAMON

   - another series also from SeongJae which completes some fixes for a
     DAMON startup issue"

* tag 'mm-hotfixes-stable-2025-09-17-21-10' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  zram: fix slot write race condition
  nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
  samples/damon/mtier: avoid starting DAMON before initialization
  samples/damon/prcl: avoid starting DAMON before initialization
  samples/damon/wsse: avoid starting DAMON before initialization
  MAINTAINERS: add Lance Yang as a THP reviewer
  MAINTAINERS: add Jann Horn as rmap reviewer
  mm/damon/sysfs: use dynamically allocated repeat mode damon_call_control
  mm/damon/core: introduce damon_call_control->dealloc_on_cancel
  mm: folio_may_be_lru_cached() unless folio_test_large()
  mm: revert "mm: vmscan.c: fix OOM on swap stress test"
  mm: revert "mm/gup: clear the LRU flag of a page before adding to LRU batch"
  mm/gup: local lru_add_drain() to avoid lru_add_drain_all()
  mm/gup: check ref_count instead of lru before migration
parents 592a93fe ce4be9e4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16196,6 +16196,7 @@ R: Rik van Riel <riel@surriel.com>
R:	Liam R. Howlett <Liam.Howlett@oracle.com>
R:	Vlastimil Babka <vbabka@suse.cz>
R:	Harry Yoo <harry.yoo@oracle.com>
R:	Jann Horn <jannh@google.com>
L:	linux-mm@kvack.org
S:	Maintained
F:	include/linux/rmap.h
@@ -16240,6 +16241,7 @@ R: Nico Pache <npache@redhat.com>
R:	Ryan Roberts <ryan.roberts@arm.com>
R:	Dev Jain <dev.jain@arm.com>
R:	Barry Song <baohua@kernel.org>
R:	Lance Yang <lance.yang@linux.dev>
L:	linux-mm@kvack.org
S:	Maintained
W:	http://www.linux-mm.org
+3 −5
Original line number Diff line number Diff line
@@ -1795,6 +1795,7 @@ static int write_same_filled_page(struct zram *zram, unsigned long fill,
				  u32 index)
{
	zram_slot_lock(zram, index);
	zram_free_page(zram, index);
	zram_set_flag(zram, index, ZRAM_SAME);
	zram_set_handle(zram, index, fill);
	zram_slot_unlock(zram, index);
@@ -1832,6 +1833,7 @@ static int write_incompressible_page(struct zram *zram, struct page *page,
	kunmap_local(src);

	zram_slot_lock(zram, index);
	zram_free_page(zram, index);
	zram_set_flag(zram, index, ZRAM_HUGE);
	zram_set_handle(zram, index, handle);
	zram_set_obj_size(zram, index, PAGE_SIZE);
@@ -1855,11 +1857,6 @@ static int zram_write_page(struct zram *zram, struct page *page, u32 index)
	unsigned long element;
	bool same_filled;

	/* First, free memory allocated to this slot (if any) */
	zram_slot_lock(zram, index);
	zram_free_page(zram, index);
	zram_slot_unlock(zram, index);

	mem = kmap_local_page(page);
	same_filled = page_same_filled(mem, &element);
	kunmap_local(mem);
@@ -1901,6 +1898,7 @@ static int zram_write_page(struct zram *zram, struct page *page, u32 index)
	zcomp_stream_put(zstrm);

	zram_slot_lock(zram, index);
	zram_free_page(zram, index);
	zram_set_handle(zram, index, handle);
	zram_set_obj_size(zram, index, comp_len);
	zram_slot_unlock(zram, index);
+2 −2
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)
 ************************************************************************/

static ssize_t nilfs_feature_revision_show(struct kobject *kobj,
					    struct attribute *attr, char *buf)
					    struct kobj_attribute *attr, char *buf)
{
	return sysfs_emit(buf, "%d.%d\n",
			NILFS_CURRENT_REV, NILFS_MINOR_REV);
@@ -1087,7 +1087,7 @@ static const char features_readme_str[] =
	"(1) revision\n\tshow current revision of NILFS file system driver.\n";

static ssize_t nilfs_feature_README_show(struct kobject *kobj,
					 struct attribute *attr,
					 struct kobj_attribute *attr,
					 char *buf)
{
	return sysfs_emit(buf, features_readme_str);
+4 −4
Original line number Diff line number Diff line
@@ -50,16 +50,16 @@ struct nilfs_sysfs_dev_subgroups {
	struct completion sg_segments_kobj_unregister;
};

#define NILFS_COMMON_ATTR_STRUCT(name) \
#define NILFS_KOBJ_ATTR_STRUCT(name) \
struct nilfs_##name##_attr { \
	struct attribute attr; \
	ssize_t (*show)(struct kobject *, struct attribute *, \
	ssize_t (*show)(struct kobject *, struct kobj_attribute *, \
			char *); \
	ssize_t (*store)(struct kobject *, struct attribute *, \
	ssize_t (*store)(struct kobject *, struct kobj_attribute *, \
			 const char *, size_t); \
}

NILFS_COMMON_ATTR_STRUCT(feature);
NILFS_KOBJ_ATTR_STRUCT(feature);

#define NILFS_DEV_ATTR_STRUCT(name) \
struct nilfs_##name##_attr { \
+2 −0
Original line number Diff line number Diff line
@@ -636,6 +636,7 @@ struct damon_operations {
 * @data:		Data that will be passed to @fn.
 * @repeat:		Repeat invocations.
 * @return_code:	Return code from @fn invocation.
 * @dealloc_on_cancel:	De-allocate when canceled.
 *
 * Control damon_call(), which requests specific kdamond to invoke a given
 * function.  Refer to damon_call() for more details.
@@ -645,6 +646,7 @@ struct damon_call_control {
	void *data;
	bool repeat;
	int return_code;
	bool dealloc_on_cancel;
/* private: internal use only */
	/* informs if the kdamond finished handling of the request */
	struct completion completion;
Loading