From: "Jan Beulich" Subject: [PATCH] linux: adjust Solarflare module_param() permissions Date: Thu, 21 Feb 2008 09:01:02 +0000 Message-ID: <47BD4BDE.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Using permissions with bit 1 set (i.e. 0666) is prohibited on module parameters on 2.6.20+. Presumably it was never meant to permit writes by everyone? As usual, written and tested on 2.6.24.1 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2008-02-20/drivers/xen/sfc_netback/accel.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-20.orig/drivers/xen/sfc_netback/accel.c 2008-02-20 = 09:32:49.000000000 +0100 +++ head-2008-02-20/drivers/xen/sfc_netback/accel.c 2008-02-20 = 14:48:01.000000000 +0100 @@ -72,7 +72,7 @@ static struct notifier_block netback_acc =20 =20 unsigned max_pages =3D NETBACK_ACCEL_DEFAULT_MAX_BUF_PAGES; -module_param(max_pages, int, 0666); +module_param(max_pages, int, 0644); MODULE_PARM_DESC(max_pages,=20 "The number of buffer pages to enforce on each guest"); =20 Index: head-2008-02-20/drivers/xen/sfc_netfront/accel_netfront.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-20.orig/drivers/xen/sfc_netfront/accel_netfront.c = 2008-02-20 09:32:49.000000000 +0100 +++ head-2008-02-20/drivers/xen/sfc_netfront/accel_netfront.c 2008-02-20 = 14:48:27.000000000 +0100 @@ -235,11 +235,11 @@ struct netfront_accel_hooks accel_hooks=20 =20 =20 unsigned max_pages =3D NETFRONT_ACCEL_DEFAULT_BUF_PAGES; -module_param (max_pages, int, 0666); +module_param(max_pages, int, 0644); MODULE_PARM_DESC(max_pages, "Number of buffer pages to request"); =20 unsigned buffer_split =3D 2; -module_param (buffer_split, int, 0666); +module_param(buffer_split, int, 0644); MODULE_PARM_DESC(buffer_split, "Fraction of buffers to use for TX, rest = for RX"); =20 =20