lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200420143502.GO6581@nanopsycho.orion>
Date:   Mon, 20 Apr 2020 16:35:02 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Taehee Yoo <ap420073@...il.com>
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net v2] team: fix hang in team_mode_get()

Mon, Apr 20, 2020 at 03:11:45PM CEST, ap420073@...il.com wrote:

[...]


>diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>index 4004f98e50d9..4f1ccbafb961 100644
>--- a/drivers/net/team/team.c
>+++ b/drivers/net/team/team.c
>@@ -465,8 +465,11 @@ EXPORT_SYMBOL(team_mode_unregister);
> 
> static const struct team_mode *team_mode_get(const char *kind)
> {
>-	struct team_mode_item *mitem;
> 	const struct team_mode *mode = NULL;
>+	struct team_mode_item *mitem;

Remove this unrelated move from the patch.


>+
>+	if (!try_module_get(THIS_MODULE))
>+		return NULL;
> 
> 	spin_lock(&mode_list_lock);
> 	mitem = __find_mode(kind);
>@@ -483,6 +486,7 @@ static const struct team_mode *team_mode_get(const char *kind)
> 	}
> 
> 	spin_unlock(&mode_list_lock);
>+	module_put(THIS_MODULE);
> 	return mode;
> }
> 
>-- 
>2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ