From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Eric Dumazet <edumazet@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>,
"David S . Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"Eric W . Biederman" <ebiederm@xmission.com>,
Majd Dibbiny <majd@mellanox.com>,
Yonatan Cohen <yonatanc@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>
Subject: Re: [PATCH v2 net-next 0/7] net: speedup netns create/delete time
Date: Wed, 13 Dec 2017 13:52:29 -0800 [thread overview]
Message-ID: <1513201949.25033.68.camel@gmail.com> (raw)
In-Reply-To: <CAKdAkRTpnxxW0h5smyUDQKm4f94D6-i7G5UK_NnGj_i-cwj35Q@mail.gmail.com>
On Wed, 2017-12-13 at 13:43 -0800, Dmitry Torokhov wrote:
> Hi Eric,
>
> On Thu, Oct 19, 2017 at 7:11 AM, Eric Dumazet <edumazet@google.com> wrote:
> >
> > On Thu, Oct 19, 2017 at 4:48 AM, Tariq Toukan <tariqt@mellanox.com> wrote:
> > >
> > > Hi Eric,
> > >
> > > I just wanted to check if this is solved already, as I don't want to keep an
> > > unnecessary revert patch in our internal branches.
> > > According to my check bug still exists.
> > >
> >
> > I will handle this today, thanks for the reminder.
>
> Did you have a chance to do this? It looks like the original change
> landed on mainline and causes modules to be autoloaded on KOBJ_UNBIND
> again.
>
> Thanks!
I sent the following to Tariq, and he tested it successfully.
I will submit this formally.
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index c3e84edc47c965d40199b652ba78876cdaa9c70c..0795482b15d5a8f1b65b570a071aa1419cb923d8 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -346,19 +346,25 @@ 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=";
+ size_t offset = 0, len;
int i;
for (i = 0; i < env->envp_idx;) {
+ len = strlen(env->envp[i]) + 1;
if (strncmp(env->envp[i], modalias_prefix,
sizeof(modalias_prefix) - 1)) {
i++;
+ offset += len;
continue;
}
- if (i != env->envp_idx - 1)
+ env->buflen -= len;
+ if (i != env->envp_idx - 1) {
+ memmove(env->envp[i], env->envp[i + 1],
+ env->buflen - offset);
memmove(&env->envp[i], &env->envp[i + 1],
sizeof(env->envp[i]) * env->envp_idx - 1);
-
+ }
env->envp_idx--;
}
}
next prev parent reply other threads:[~2017-12-13 21:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 23:27 [PATCH v2 net-next 0/7] net: speedup netns create/delete time Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 1/7] kobject: add kobject_uevent_net_broadcast() Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 2/7] kobject: copy env blob in one go Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 3/7] kobject: factorize skb setup in kobject_uevent_net_broadcast() Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 4/7] ipv6: addrlabel: per netns list Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 5/7] tcp: batch tcp_net_metrics_exit Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 6/7] ipv6: speedup ipv6 tunnels dismantle Eric Dumazet
2017-09-19 23:27 ` [PATCH v2 net-next 7/7] ipv4: " Eric Dumazet
2017-09-19 23:32 ` [PATCH v2 net-next 0/7] net: speedup netns create/delete time David Miller
2017-09-26 11:21 ` Tariq Toukan
2017-09-26 12:51 ` Eric Dumazet
2017-09-26 15:04 ` Tariq Toukan
2017-09-26 15:13 ` Eric Dumazet
2017-09-26 15:22 ` Dmitry Torokhov
2017-09-26 15:30 ` Eric Dumazet
2017-10-19 11:48 ` Tariq Toukan
2017-10-19 14:11 ` Eric Dumazet
2017-12-13 21:43 ` Dmitry Torokhov
2017-12-13 21:52 ` Eric Dumazet [this message]
2017-12-13 22:24 ` Dmitry Torokhov
2017-09-26 15:26 ` Tariq Toukan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513201949.25033.68.camel@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=ebiederm@xmission.com \
--cc=edumazet@google.com \
--cc=eranbe@mellanox.com \
--cc=majd@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
--cc=yonatanc@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).