Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-02-14 14:03:42 +0100
committerMichal Kubecek <mkubecek@suse.cz>2019-02-14 14:03:42 +0100
commitdf9d7f340dca96322c95553e061080d1b533ddd1 (patch)
treea0a0452cbed2279a0a7c5cee1d5b93341492acfd
parent368222185738e7cec125a80f118633afa01e63a9 (diff)
kobject: copy env blob in one go (bsc#1122982).
-rw-r--r--lib/kobject_uevent.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 27aaebba7695..3f0e6afee29c 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -174,18 +174,12 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
skb = alloc_skb(len + env->buflen, GFP_KERNEL);
if (skb) {
char *scratch;
- int i;
/* add header */
scratch = skb_put(skb, len);
sprintf(scratch, "%s@%s", action_string, devpath);
- /* copy keys to our continuous event payload buffer */
- for (i = 0; i < env->envp_idx; i++) {
- len = strlen(env->envp[i]) + 1;
- scratch = skb_put(skb, len);
- strcpy(scratch, env->envp[i]);
- }
+ skb_put_data(skb, env->buf, env->buflen);
NETLINK_CB(skb).dst_group = 1;
retval = netlink_broadcast_filtered(uevent_sock, skb,