Re: [PATCH] swap: Check nrexceptional of swap cache before being freed

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

 



On Wed 20-01-21 15:54:04, Huang, Ying wrote:
> Michal Hocko <mhocko@xxxxxxxx> writes:
> 
> > On Wed 20-01-21 15:27:11, Huang Ying wrote:
> >> To catch the error in updating the swap cache shadow entries or their count.
> >
> > What is the error?
> 
> There's no error in the current code.  But we will change the related
> code in the future.  So this checking will help us to prevent error in
> the future.  I will change the patch description to make it more clear.
> 
> > Can it happens in the real life? Why do we need this
> > patch? Is crashing the kernel the right way to handle the situation?
> 
> Emm... The mistake to update swap shadow entries will hurt performance,
> but will not trigger functionality bug.  So it may be better to use
> VM_WARN_ON_ONCE().

Yes a warning is much more appropriate approach. The question is whether
a test like this is really necessary. But I will leave that to others to
decide. It was really the bug on that hit my eyes.

-- 
Michal Hocko
SUSE Labs




[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