lkml.org 
[lkml]   [2013]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] befs: fix return value check in befs_iget()
On Wed, Oct 30, 2013 at 10:52:38AM -0700, Kees Cook wrote:
> On Mon, Oct 28, 2013 at 7:00 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> >
> > In case of error, the function iget_locked() returns NULL pointer
> > not ERR_PTR(). The IS_ERR() test in the return value check should
> > be replaced with NULL test.
> >
> > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Good catch, thanks!
>
> Acked-by: Kees Cook <keescook@chromium.org>
>
> As an aside, Dan, how hard would this kind of mismatch be to detect
> with smatch?

It already does, but you need the cross function database set up.

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-10-30 19:41    [W:0.039 / U:46.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site