Messages in this thread | | | Date | Wed, 30 Oct 2013 21:29:02 +0300 | From | Dan Carpenter <> | Subject | Re: [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
| |