Re: [PATCH 14/14] mm: oom_kill: use IS_ERR() instead of strict checking

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

 



On Mon, 6 Sep 2010, KOSAKI Motohiro wrote:

> > From: Vasiliy Kulikov <segooon@xxxxxxxxx>
> > 
> > Use IS_ERR() instead of strict checking.
> 
> Umm...
> 
> I don't like this. IS_ERR() imply an argument is error code. but in
> this case, we don't use error code. -1 mean oom special purpose meaning
> value.
> 

You could make the same argument by saying the current use of PTR_ERR() 
implies an error code.  We've simply hijacked -1UL for simplicity in this 
case and because select_bad_process() can only return one other value 
besides a pointer to a process or NULL.

> So, if we take this direction, It would be better to use EAGAIN or something
> instead -1.
> 

I agree it would probably better to return ERR_PTR(-EAGAIN) instead of 
using -1UL.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux