aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2019-09-25 17:47:11 +0300
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-19 14:29:44 +0200
commit9784a470bb490988b275d32d4bbe9ddd56c2fd71 (patch)
treebebcd136c77bf8e227abf99f61af6cadfa8d6a48 /package/kernel
parent3b1d71ffd885531a961ed368ebfc07a71b828a0f (diff)
downloadupstream-9784a470bb490988b275d32d4bbe9ddd56c2fd71.tar.gz
upstream-9784a470bb490988b275d32d4bbe9ddd56c2fd71.tar.bz2
upstream-9784a470bb490988b275d32d4bbe9ddd56c2fd71.zip
trelay: handle netdevice events correctly
Since v3.11, netdevice notification data are of type "struct netdev_notifier_info". Handle it as such! This should fix a critical bug in which devices are unable get released because trelay does not release resources in response to UNREGISTER event spamming the log with something like: unregister_netdevice: waiting for eth0.1 to become free. Usage count = 1 Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> (cherry picked from commit 77cfc0739d30c1282f7de24d2ec086d244e34bb7)
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/trelay/src/trelay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/trelay/src/trelay.c b/package/kernel/trelay/src/trelay.c
index 581a5cfd2f..d09dc07246 100644
--- a/package/kernel/trelay/src/trelay.c
+++ b/package/kernel/trelay/src/trelay.c
@@ -86,7 +86,7 @@ static struct trelay *trelay_find(struct net_device *dev)
static int tr_device_event(struct notifier_block *unused, unsigned long event,
void *ptr)
{
- struct net_device *dev = ptr;
+ struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct trelay *tr;
if (event != NETDEV_UNREGISTER)