[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTin-FoPAhqrbjNZY8K4JrXTZPSnHO3DK9mpUR83q@mail.gmail.com>
Date: Fri, 28 Jan 2011 08:10:25 +0200
From: Lucian Adrian Grijincu <lucian.grijincu@...il.com>
To: netdev@...r.kernel.org
Cc: Octavian Purdila <opurdila@...acom.com>
Subject: [PATCH 1/2] RFC: sysctl: write ctl_table->extra2 to table entries
created from a ctl_path
For each entry in an array of 'struct ctl_path' we were registering a
'struct ctl_table' array with two entries:
A) one to store the name + permissions,
B) one as an end-of-array marker (completely blank).
but we were not using any of the data storage fields
(data, extra1, extra2) in the first 'struct ctl_table'.
This adds possibility of storring some user provided
pointer in the 'extra2' field.
All users these functions store NULL in the 'extra2'
field like they used to before this patch:
* register_sysctl_paths
* register_net_sysctl_table
* register_net_sysctl_rotable
Until now sysctl_check_table considered that the 'struct ctl_table' of
directories may not store anything in the 'extra2' field. We no longer
consider this a fault.
Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@...il.com>
---
include/linux/sysctl.h | 2 +-
include/net/net_namespace.h | 2 ++
kernel/sysctl.c | 7 +++++--
kernel/sysctl_check.c | 2 --
net/sysctl_net.c | 20 ++++++++++++++------
5 files changed, 22 insertions(+), 11 deletions(-)
View attachment "0001-RFC-sysctl-write-ctl_table-extra2-to-table-entries-c.patch" of type "text/x-patch" (5048 bytes)
Powered by blists - more mailing lists