summaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2025-06-02 13:02:13 +0200
committerVlastimil Babka <vbabka@suse.cz>2025-06-17 11:57:36 +0200
commit5660ee54e7982f9097ddc684e90f15bdcc7fef4b (patch)
tree1e3ad4a37179175052ac30459f1c033f82265684 /lib/crypto/mpi/mpi-sub-ui.c
parente2d18cbf178775ad377ad88ee55e6e183c38d262 (diff)
mm, slab: use frozen pages for large kmalloc
Since slab pages are now frozen, it makes sense to have large kmalloc() objects behave same as small kmalloc(), as the choice between the two is an implementation detail depending on allocation size. Notably, increasing refcount on a slab page containing kmalloc() object is not possible anymore, so it should be consistent for large kmalloc pages. Therefore, change large kmalloc to use the frozen pages API. Because of some unexpected fallout in the slab pages case (see commit b9c0e49abfca ("mm: decline to manipulate the refcount on a slab page"), implement the same kind of checks and warnings as part of this change. Notably, networking code using sendpage_ok() to determine whether the page refcount can be manipulated in the network stack should continue behaving correctly. Before this change, the function returns true for large kmalloc pages and page refcount can be manipulated. After this change, the function will return false. Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Acked-by: Harry Yoo <harry.yoo@oracle.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'lib/crypto/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions