Re: [PATCH] mm/mlock: fix zero-length request normalization and integer overflows

From: 박태선/컴퓨터·AI학부

Date: Tue Sep 29 2026 - 05:50:45 EST


Understood, and thank you for the feedback.

I sincerely apologize for the poor code quality and flawed helper
design. I will be much more careful with commenting and ensure future
contributions strictly adhere to kernel guidelines.

I will drop this patch.

For David's question regarding reproducers and user-visible issues, in
case it is helpful if the core team addresses this later,
here is what is observed from a small test program wrote checking
/proc/self/smaps on an unpatched kernel:

$ ./test_mlock
mlock(p, -1UL) : ret=0, locked=0 (silent success without actually locking)
mlock(p + 5, 0) : ret=0, locked=1 (0-length request falsely locks 4KB page)
munlock(p + 5, 0) : ret=0, locked=0 (0-length request falsely unlocks 4KB page)

Thank you all for your time and the review.