diff options
author | Adrian Stratulat <adrian.stratulat@enea.com> | 2020-06-09 13:10:17 +0200 |
---|---|---|
committer | Adrian Stratulat <adrian.stratulat@enea.com> | 2020-06-11 12:31:55 +0200 |
commit | 2e53208e8c1eaf83fb6b6411f8465f2bdf1d6069 (patch) | |
tree | a75c155496521cf9fb1931751aa573d8bb33a1ea /patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch | |
parent | 9153e7a0c6a10dfe5ada1661ab116068cfc364ee (diff) | |
download | enea-kernel-cache-ampere-4.14.tar.gz |
Add supporting config snippetsampere-4.14
Change-Id: Ic2f7c31c8ad274f4c3677320b81ccb0407612711
Signed-off-by: Adrian Stratulat <adrian.stratulat@enea.com>
Diffstat (limited to 'patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch')
-rw-r--r-- | patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch b/patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch new file mode 100644 index 0000000..5133075 --- /dev/null +++ b/patches/ipv4/0001-IPV4-unlock-rtnl_mutex-before-waiting-for-carrier-on.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1828e68d8f0b99dbe388de4b6703afd90fdd7493 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dragos Motrea <Dragos.Motrea@enea.com> | ||
3 | Date: Thu, 16 Mar 2017 14:04:17 +0100 | ||
4 | Subject: [PATCH] IPV4: unlock rtnl_mutex before waiting for carrier on | ||
5 | |||
6 | There is a race condition between ip auto configuration and the ethernet | ||
7 | driver. The ip configuration is taking the rtnl_mutex in the ic_open_devs() | ||
8 | function and then is waiting 120 seconds for a carrier on at least | ||
9 | one network device. The driver is locked in the mutex and the carrier on | ||
10 | is not sent. After 120 seconds, the mutex is unlocked and the driver is | ||
11 | continuing its task execution. | ||
12 | |||
13 | The mutex should be unlocked in the ip auto configuration before waiting the | ||
14 | carrier on from the ethernet driver. | ||
15 | |||
16 | Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com> | ||
17 | --- | ||
18 | net/ipv4/ipconfig.c | 3 +-- | ||
19 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c | ||
22 | index 071a785..55c95cc 100644 | ||
23 | --- a/net/ipv4/ipconfig.c | ||
24 | +++ b/net/ipv4/ipconfig.c | ||
25 | @@ -254,6 +254,7 @@ static int __init ic_open_devs(void) | ||
26 | dev->name, able, d->xid); | ||
27 | } | ||
28 | } | ||
29 | + rtnl_unlock(); | ||
30 | |||
31 | /* no point in waiting if we could not bring up at least one device */ | ||
32 | if (!ic_first_dev) | ||
33 | @@ -281,8 +282,6 @@ static int __init ic_open_devs(void) | ||
34 | next_msg = jiffies + msecs_to_jiffies(CONF_CARRIER_TIMEOUT/12); | ||
35 | } | ||
36 | have_carrier: | ||
37 | - rtnl_unlock(); | ||
38 | - | ||
39 | *last = NULL; | ||
40 | |||
41 | if (!ic_first_dev) { | ||
42 | -- | ||
43 | 2.7.4 | ||
44 | |||