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-next>] [day] [month] [year] [list]
Date:	Wed, 11 Feb 2009 13:27:19 -0800
From:	akpm@...ux-foundation.org
To:	davem@...emloft.net
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	andi@...stfloor.org, johnpol@....mipt.ru
Subject: [patch 2/2] Documentation/connector/cn_test.c: don't use gfp_any()

From: Andrew Morton <akpm@...ux-foundation.org>

cn_test_timer_func() is a timer handler and can never use GFP_KERNEL -
there's no point in using gfp_any() here.

Also, use setup_timer().

Cc: Evgeniy Polyakov <johnpol@....mipt.ru>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Andi Kleen <andi@...stfloor.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 Documentation/connector/cn_test.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -puN Documentation/connector/cn_test.c~documentation-connector-cn_testc-dont-use-gfp_any Documentation/connector/cn_test.c
--- a/Documentation/connector/cn_test.c~documentation-connector-cn_testc-dont-use-gfp_any
+++ a/Documentation/connector/cn_test.c
@@ -137,7 +137,7 @@ static void cn_test_timer_func(unsigned 
 
 		memcpy(m + 1, data, m->len);
 
-		cn_netlink_send(m, 0, gfp_any());
+		cn_netlink_send(m, 0, GFP_ATOMIC);
 		kfree(m);
 	}
 
@@ -160,10 +160,8 @@ static int cn_test_init(void)
 		goto err_out;
 	}
 
-	init_timer(&cn_test_timer);
-	cn_test_timer.function = cn_test_timer_func;
+	setup_timer(&cn_test_timer, cn_test_timer_func, 0);
 	cn_test_timer.expires = jiffies + HZ;
-	cn_test_timer.data = 0;
 	add_timer(&cn_test_timer);
 
 	return 0;
_
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists