Re: [PATCH] Fix zero_user_segments() with start > end

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

 



On Sat, Feb 27, 2021 at 01:11:35AM +0900, OGAWA Hirofumi wrote:
> zero_user_segments() is used from __block_write_begin_int(), for
> example like the following
> 
> 	zero_user_segments(page, 4096, 1024, 512, 918)
> 
> But new zero_user_segments() implements for HIGMEM + TRANSPARENT_HUGEPAGE 
> doesn't handle "start > end" case correctly, and hits BUG_ON(). (we
> can fix __block_write_begin_int() instead though, it is the old and
> multiple usage)

Why don't we just take out the BUG_ON instead?  The function doesn't
actually do the wrong thing.

> Also it calls kmap_atomic() unnecessary while start == end == 0.

I'm OK with that.  It always used to do that.

> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>

Fixes: 0060ef3b4e6d ("mm: support THPs in zero_user_segments")





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux