History

Merge tag 'mm-hotfixes-stable-2022-12-10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton: "Nine hotfixes. Six for MM, three for other areas. Four of these patches address post-6.0 issues" * tag 'mm-hotfixes-stable-2022-12-10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: memcg: fix possible use-after-free in memcg_write_event_control() MAINTAINERS: update Muchun Song's email mm/gup: fix gup_pud_range() for dax mmap: fix do_brk_flags() modifying obviously incorrect VMAs mm/swap: fix SWP_PFN_BITS with CONFIG_PHYS_ADDR_T_64BIT on 32bit tmpfs: fix data loss from failed fallocate kselftests: cgroup: update kmem test precision tolerance mm: do not BUG_ON missing brk mapping, because userspace can unmap it mailmap: update Matti Vaittinen's email address

Linus Torvalds committed 3 years ago

Commit 4cee37b2 parents 296a7b7 4a7ba457 files · +29 −19Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/swapops.h+5−3
@@ -33,11 +33,13 @@ · 32 unmodified lines
3333 * can use the extra bits to store other information besides PFN.
3434 */
3535 #ifdef MAX_PHYSMEM_BITS
36−#define SWP_PFN_BITS (MAX_PHYSMEM_BITS - PAGE_SHIFT)
36+#define SWP_PFN_BITS (MAX_PHYSMEM_BITS - PAGE_SHIFT)
3737 #else /* MAX_PHYSMEM_BITS */
38−#define SWP_PFN_BITS (BITS_PER_LONG - PAGE_SHIFT)
38+#define SWP_PFN_BITS min_t(int, \
39+ sizeof(phys_addr_t) * 8 - PAGE_SHIFT, \
40+ SWP_TYPE_SHIFT)
3941 #endif /* MAX_PHYSMEM_BITS */
40−#define SWP_PFN_MASK (BIT(SWP_PFN_BITS) - 1)
42+#define SWP_PFN_MASK (BIT(SWP_PFN_BITS) - 1)
4143
4244 /**
4345 * Migration swap entry specific bitfield definitions. Layout:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t