Skip to content

Commit 74be2d3

Browse files
committed
umd: For clarity rename umh_info umd_info
This structure is only used for user mode drivers so change the prefix from umh to umd to make that clear. 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 884c5e6 commit 74be2d3

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

include/linux/bpfilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
1111
int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
1212
int __user *optlen);
1313
struct bpfilter_umh_ops {
14-
struct umh_info info;
14+
struct umd_info info;
1515
/* since ip_getsockopt() can run in parallel, serialize access to umh */
1616
struct mutex lock;
1717
int (*sockopt)(struct sock *sk, int optname,

include/linux/usermode_driver.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ static inline void exit_umh(struct task_struct *tsk)
1717
}
1818
#endif
1919

20-
struct umh_info {
20+
struct umd_info {
2121
const char *cmdline;
2222
struct file *pipe_to_umh;
2323
struct file *pipe_from_umh;
2424
struct list_head list;
25-
void (*cleanup)(struct umh_info *info);
25+
void (*cleanup)(struct umd_info *info);
2626
pid_t pid;
2727
};
28-
int fork_usermode_blob(void *data, size_t len, struct umh_info *info);
28+
int fork_usermode_blob(void *data, size_t len, struct umd_info *info);
2929

3030
#endif /* __LINUX_USERMODE_DRIVER_H__ */

kernel/usermode_driver.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static DEFINE_MUTEX(umh_list_lock);
1111

1212
static int umd_setup(struct subprocess_info *info, struct cred *new)
1313
{
14-
struct umh_info *umh_info = info->data;
14+
struct umd_info *umd_info = info->data;
1515
struct file *from_umh[2];
1616
struct file *to_umh[2];
1717
int err;
@@ -43,21 +43,21 @@ static int umd_setup(struct subprocess_info *info, struct cred *new)
4343
return err;
4444
}
4545

46-
umh_info->pipe_to_umh = to_umh[1];
47-
umh_info->pipe_from_umh = from_umh[0];
48-
umh_info->pid = task_pid_nr(current);
46+
umd_info->pipe_to_umh = to_umh[1];
47+
umd_info->pipe_from_umh = from_umh[0];
48+
umd_info->pid = task_pid_nr(current);
4949
current->flags |= PF_UMH;
5050
return 0;
5151
}
5252

5353
static void umd_cleanup(struct subprocess_info *info)
5454
{
55-
struct umh_info *umh_info = info->data;
55+
struct umd_info *umd_info = info->data;
5656

5757
/* cleanup if umh_setup() was successful but exec failed */
5858
if (info->retval) {
59-
fput(umh_info->pipe_to_umh);
60-
fput(umh_info->pipe_from_umh);
59+
fput(umd_info->pipe_to_umh);
60+
fput(umd_info->pipe_from_umh);
6161
}
6262
}
6363

@@ -72,12 +72,12 @@ static void umd_cleanup(struct subprocess_info *info)
7272
*
7373
* Returns either negative error or zero which indicates success
7474
* in executing a blob of bytes as a usermode process. In such
75-
* case 'struct umh_info *info' is populated with two pipes
75+
* case 'struct umd_info *info' is populated with two pipes
7676
* and a pid of the process. The caller is responsible for health
7777
* check of the user process, killing it via pid, and closing the
7878
* pipes when user process is no longer needed.
7979
*/
80-
int fork_usermode_blob(void *data, size_t len, struct umh_info *info)
80+
int fork_usermode_blob(void *data, size_t len, struct umd_info *info)
8181
{
8282
const char *cmdline = (info->cmdline) ? info->cmdline : "usermodehelper";
8383
struct subprocess_info *sub_info;
@@ -126,7 +126,7 @@ EXPORT_SYMBOL_GPL(fork_usermode_blob);
126126

127127
void __exit_umh(struct task_struct *tsk)
128128
{
129-
struct umh_info *info;
129+
struct umd_info *info;
130130
pid_t pid = tsk->pid;
131131

132132
mutex_lock(&umh_list_lock);

net/ipv4/bpfilter/sockopt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
struct bpfilter_umh_ops bpfilter_ops;
1313
EXPORT_SYMBOL_GPL(bpfilter_ops);
1414

15-
static void bpfilter_umh_cleanup(struct umh_info *info)
15+
static void bpfilter_umh_cleanup(struct umd_info *info)
1616
{
1717
mutex_lock(&bpfilter_ops.lock);
1818
bpfilter_ops.stop = true;

0 commit comments

Comments
 (0)