netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] qlge: make nic_operations struct const
@ 2011-04-14 15:51 Stephen Hemminger
  2011-04-15  4:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2011-04-14 15:51 UTC (permalink / raw)
  To: Ron Mercer, netdev; +Cc: linux-driver

The struct nic_operations is just function pointers and should be
declared const for added security.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/qlge/qlge.h	2011-04-14 08:31:15.863779054 -0700
+++ b/drivers/net/qlge/qlge.h	2011-04-14 08:31:19.231840948 -0700
@@ -2134,7 +2134,7 @@ struct ql_adapter {
 	struct delayed_work mpi_idc_work;
 	struct delayed_work mpi_core_to_log;
 	struct completion ide_completion;
-	struct nic_operations *nic_ops;
+	const struct nic_operations *nic_ops;
 	u16 device_id;
 	struct timer_list timer;
 	atomic_t lb_count;
--- a/drivers/net/qlge/qlge_main.c	2011-04-14 08:30:32.311185557 -0700
+++ b/drivers/net/qlge/qlge_main.c	2011-04-14 08:31:07.595627135 -0700
@@ -4412,12 +4412,12 @@ error:
 	rtnl_unlock();
 }
 
-static struct nic_operations qla8012_nic_ops = {
+static const struct nic_operations qla8012_nic_ops = {
 	.get_flash		= ql_get_8012_flash_params,
 	.port_initialize	= ql_8012_port_initialize,
 };
 
-static struct nic_operations qla8000_nic_ops = {
+static const struct nic_operations qla8000_nic_ops = {
 	.get_flash		= ql_get_8000_flash_params,
 	.port_initialize	= ql_8000_port_initialize,
 };

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] qlge: make nic_operations struct const
  2011-04-14 15:51 [PATCH net-next] qlge: make nic_operations struct const Stephen Hemminger
@ 2011-04-15  4:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-04-15  4:55 UTC (permalink / raw)
  To: shemminger; +Cc: ron.mercer, netdev, linux-driver

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 14 Apr 2011 08:51:52 -0700

> The struct nic_operations is just function pointers and should be
> declared const for added security.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-15  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14 15:51 [PATCH net-next] qlge: make nic_operations struct const Stephen Hemminger
2011-04-15  4:55 ` David Miller

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).