Re: [PATCH] mm/madvise: reject invalid process_madvise() advice for zero-length vectors

From: fujunjie

Date: Mon Apr 27 2026 - 02:51:17 EST


On Sun, Apr 26, 2026 at 12:41:42PM -0700, Andrew Morton wrote:
> Seems inefficient to be checking `behavior' repeatedly. I wonder if
> your change will permit us to remove that madvise_behavior_valid()
> check from is_valid_madvise().

Yes, I think that makes sense. I'll look into preparing a follow-up
patch for this in a few days.

Best regards,
Fujunjie