mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge 4.15-rc6 into driver-core-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -345,7 +345,8 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
|
||||
static void zap_modalias_env(struct kobj_uevent_env *env)
|
||||
{
|
||||
static const char modalias_prefix[] = "MODALIAS=";
|
||||
int i;
|
||||
size_t len;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < env->envp_idx;) {
|
||||
if (strncmp(env->envp[i], modalias_prefix,
|
||||
@@ -354,11 +355,18 @@ static void zap_modalias_env(struct kobj_uevent_env *env)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i != env->envp_idx - 1)
|
||||
memmove(&env->envp[i], &env->envp[i + 1],
|
||||
sizeof(env->envp[i]) * env->envp_idx - 1);
|
||||
len = strlen(env->envp[i]) + 1;
|
||||
|
||||
if (i != env->envp_idx - 1) {
|
||||
memmove(env->envp[i], env->envp[i + 1],
|
||||
env->buflen - len);
|
||||
|
||||
for (j = i; j < env->envp_idx - 1; j++)
|
||||
env->envp[j] = env->envp[j + 1] - len;
|
||||
}
|
||||
|
||||
env->envp_idx--;
|
||||
env->buflen -= len;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user