lkml.org 
[lkml]   [2013]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kmod: Check for NULL at call_usermodehelper_exec().
From
Date
Oleg Nesterov wrote:
> It looks a bit ugly to check ->path under helper_lock(), just add
>
> if (!sub_info->path)
> retval = -ENOENT;
>
> at the start. Otherwise the code looks as if there is a subtle
> reason to take the lock before this check.

Did you mean this?

DECLARE_COMPLETION_ONSTACK(done);
int retval = 0;

+ if (!sub_info->path) {
+ call_usermodehelper_freeinfo(sub_info);
+ return -ENOENT;
+ }
helper_lock();
if (!khelper_wq || usermodehelper_disabled) {
retval = -EBUSY;
goto out;
}


\
 
 \ /
  Last update: 2013-09-15 19:21    [W:0.068 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site