Skip to content

Commit 3a17104

Browse files
committed
umh: Rename the user mode driver helpers for clarity
Now that the functionality of umh_setup_pipe and umh_clean_and_save_pid has changed their names are too specific and don't make much sense. Instead name them umd_setup and umd_cleanup for the functional role in setting up user mode drivers. v1: https://lkml.kernel.org/r/[email protected] v2: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent b044fa2 commit 3a17104

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kernel/umh.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ struct subprocess_info *call_usermodehelper_setup_file(struct file *file,
429429
return sub_info;
430430
}
431431

432-
static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
432+
static int umd_setup(struct subprocess_info *info, struct cred *new)
433433
{
434434
struct umh_info *umh_info = info->data;
435435
struct file *from_umh[2];
@@ -470,11 +470,11 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
470470
return 0;
471471
}
472472

473-
static void umh_clean_and_save_pid(struct subprocess_info *info)
473+
static void umd_cleanup(struct subprocess_info *info)
474474
{
475475
struct umh_info *umh_info = info->data;
476476

477-
/* cleanup if umh_pipe_setup() was successful but exec failed */
477+
/* cleanup if umh_setup() was successful but exec failed */
478478
if (info->retval) {
479479
fput(umh_info->pipe_to_umh);
480480
fput(umh_info->pipe_from_umh);
@@ -520,8 +520,8 @@ int fork_usermode_blob(void *data, size_t len, struct umh_info *info)
520520
}
521521

522522
err = -ENOMEM;
523-
sub_info = call_usermodehelper_setup_file(file, umh_pipe_setup,
524-
umh_clean_and_save_pid, info);
523+
sub_info = call_usermodehelper_setup_file(file, umd_setup, umd_cleanup,
524+
info);
525525
if (!sub_info)
526526
goto out;
527527

0 commit comments

Comments
 (0)