Re: [PATCH v4 06/10] mm/mremap: check remap conditions earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


(追記) (追記ここまで)



On 2025年7月20日 12:04:42 +0100 Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> wrote:
> Hi Andrew,
>
> It turns out there's some undocumented, unusual behaviour in mremap()
> around shrinking of a range which was previously missed, but an LTP test
> flagged up (seemingly by accident).
>
> Basically, if you specify an input range that spans multiple VMAs, this is
> in nearly all cases rejected (this is the point of this series, after all,
> for VMA moves).
>
> However, it turns out if you a. shrink a range and b. the new size spans
> only a single VMA in the original range - then this requirement is entirely
> dropped.
>
> So I need to slightly adjust the logic to account for this. I will also be
> documenting this in the man page as it appears the man page contradicts
> this or is at least very unclear.
>
> I attach a fix-patch, however there's some very trivial conflicts caused
> due to code being moved around.
>
OK, I applied this as a -fix.
Moved the two new hunks into check_prep_vma().
Made sure the "We are expanding and the VMA .." hunk landed properly in
check_prep_vma().
I've pushed out the result, please check current mm-unstable.

[Index of Archives] [Linux USB Devel] [Video for Linux] [Linux Audio Users] [Yosemite News] [Linux Kernel] [Linux SCSI]

(追記) (追記ここまで)
Powered by Linux

AltStyle によって変換されたページ (->オリジナル) /