You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the "small" driver core patches for 4.11-rc1. Not much here, some firmware documentation and self-test updates, a debugfs code formatting issue, and a new feature for call_usermodehelper to make it more robust on systems that want to lock it down in a more secure way. All of these have been linux-next for a while now with no reported issues" * tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kernfs: handle null pointers while printing node name and path Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Make static usermode helper binaries constant kmod: make usermodehelper path a const string firmware: revamp firmware documentation selftests: firmware: send expected errors to /dev/null selftests: firmware: only modprobe if driver is missing platform: Print the resource range if device failed to claim kref: prefer atomic_inc_not_zero to atomic_add_unless debugfs: improve formatting of debugfs_real_fops()
This commit is contained in:
+16
-2
@@ -516,7 +516,7 @@ static void helper_unlock(void)
|
||||
* Function must be runnable in either a process context or the
|
||||
* context in which call_usermodehelper_exec is called.
|
||||
*/
|
||||
struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
|
||||
struct subprocess_info *call_usermodehelper_setup(const char *path, char **argv,
|
||||
char **envp, gfp_t gfp_mask,
|
||||
int (*init)(struct subprocess_info *info, struct cred *new),
|
||||
void (*cleanup)(struct subprocess_info *info),
|
||||
@@ -528,7 +528,12 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
|
||||
goto out;
|
||||
|
||||
INIT_WORK(&sub_info->work, call_usermodehelper_exec_work);
|
||||
|
||||
#ifdef CONFIG_STATIC_USERMODEHELPER
|
||||
sub_info->path = CONFIG_STATIC_USERMODEHELPER_PATH;
|
||||
#else
|
||||
sub_info->path = path;
|
||||
#endif
|
||||
sub_info->argv = argv;
|
||||
sub_info->envp = envp;
|
||||
|
||||
@@ -566,6 +571,15 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
|
||||
retval = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* If there is no binary for us to call, then just return and get out of
|
||||
* here. This allows us to set STATIC_USERMODEHELPER_PATH to "" and
|
||||
* disable all call_usermodehelper() calls.
|
||||
*/
|
||||
if (strlen(sub_info->path) == 0)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Set the completion pointer only if there is a waiter.
|
||||
* This makes it possible to use umh_complete to free
|
||||
@@ -613,7 +627,7 @@ EXPORT_SYMBOL(call_usermodehelper_exec);
|
||||
* This function is the equivalent to use call_usermodehelper_setup() and
|
||||
* call_usermodehelper_exec().
|
||||
*/
|
||||
int call_usermodehelper(char *path, char **argv, char **envp, int wait)
|
||||
int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
|
||||
{
|
||||
struct subprocess_info *info;
|
||||
gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
|
||||
Reference in New Issue
Block a user