Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next-2.6 0/4] net: convert to use mc helpers round 1
From: David Miller @ 2010-02-05 16:58 UTC (permalink / raw)
  To: jpirko; +Cc: netdev
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Fri, 5 Feb 2010 13:46:23 +0100

> I started with drivers I use daily. There are four of them.

Looks good, all applied to net-next-2.6, thanks.

^ permalink raw reply

* Re: linux-next: manual merge of the trivial tree with the net tree
From: David Miller @ 2010-02-05 16:55 UTC (permalink / raw)
  To: jkosina; +Cc: sfr, linux-next, linux-kernel, adam.buchbinder, netdev,
	bhutchings
In-Reply-To: <alpine.LNX.2.00.1002051216460.15395@pobox.suse.cz>

From: Jiri Kosina <jkosina@suse.cz>
Date: Fri, 5 Feb 2010 12:23:06 +0100 (CET)

> Ayway, below is the hunk that I have already dropped from my tree (so that 
> conflict in linux-next is gone), please feel free to apply it to your 
> tree, and let me known whether you want me to reject all furutre patches 

I can't apply it to my tree, that's why we had the conflict
in the first place.

Please submit this to me so that it applies cleanly to net-next-2.6

Thanks.

^ permalink raw reply

* Re: [RFC 3/4] bond: support more Layer 4 protocols
From: Stephen Hemminger @ 2010-02-05 16:42 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David Miller, Jay Vosburgh, netdev, bonding-devel
In-Reply-To: <4B6BF50D.9060603@trash.net>

On Fri, 05 Feb 2010 11:38:05 +0100
Patrick McHardy <kaber@trash.net> wrote:

> Stephen Hemminger wrote:
> > +/* Map of protocols with standard ports available to include in hash */
> > +static const bool has_layer4[256] = {
> > +	[IPPROTO_TCP] = 1,
> > +	[IPPROTO_UDP] = 1,
> > +	[IPPROTO_UDPLITE] = 1,
> > +	[IPPROTO_SCTP] = 1,
> > +	[IPPROTO_DCCP] = 1,
> > +	[IPPROTO_ESP] = 1,
> > +};
> > +
> 
> How about using a bitmap or u8s to keep this more compact?

I thought about that, but couldn't find a clever way to initialize at
compile time other than hardcoding constants?

^ permalink raw reply

* Re: 2.6.32.8-stable review : kernel crashed asap
From: Américo Wang @ 2010-02-05 15:57 UTC (permalink / raw)
  To: Toralf Förster; +Cc: Américo Wang, linux-kernel, netdev
In-Reply-To: <201002051622.02980.toralf.foerster@gmx.de>

On Fri, Feb 05, 2010 at 04:22:02PM +0100, Toralf Förster wrote:
>
>Américo Wang wrote at 16:10:21
>> On Thu, Feb 04, 2010 at 09:29:41PM +0100, Toralf Förster wrote:
>> >Immediately during boot it crashed w/ the attached config - no lines
>> > within syslog  to post.
>> 
>> What error messages did you see on your screen?
>> 
>
>I attached a screen shot.
>

Thanks! It's better that if you can capture these info via netconsole
or something like that, so that you copy and paste them into email.

Hmm, it seems that a null pointer deref happened in
net/ipv4/devinet.c::inetdev_init(), so Cc'ing netdev guys....

Could you please run the command:

  addr2line -e your_2.6.32.8_vmlinux 0xc11fea28

to check in which line we dereferenced a null pointer?

Thank you!

-- 
Live like a child, think like the god.
 

^ permalink raw reply

* [PATCH 3/3] via-velocity: Fix races on shared interrupts
From: Simon Kagstrom @ 2010-02-05 15:55 UTC (permalink / raw)
  To: netdev, davem; +Cc: davej, ben
In-Reply-To: <20100205165253.3f316b98@marrow.netinsight.se>

This patch fixes two potential races in the velocity driver:

* Move the ACK and error handler to the interrupt handler. This fixes a
  potential race with shared interrupts when the other device interrupts
  before the NAPI poll handler has finished. As the velocity driver hasn't
  acked it's own interrupt, it will then steal the interrupt from the
  other device.

* Use spin_trylock in the interrupt handler. To avoid having the
  interrupt off for long periods of time, velocity_poll uses non-irqsave
  spinlocks. In the current code, the interrupt handler will deadlock if
  e.g., the NAPI poll handler is executing when an interrupt (for another
  device) comes in since it tries to take the already held lock.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Anders Grafstrom <anders.grafstrom@netinsight.net>
---
 drivers/net/via-velocity.c |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 5e213f7..6882e7c 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2148,16 +2148,8 @@ static int velocity_poll(struct napi_struct *napi, int budget)
 	struct velocity_info *vptr = container_of(napi,
 			struct velocity_info, napi);
 	unsigned int rx_done;
-	u32 isr_status;
 
 	spin_lock(&vptr->lock);
-	isr_status = mac_read_isr(vptr->mac_regs);
-
-	/* Ack the interrupt */
-	mac_write_isr(vptr->mac_regs, isr_status);
-	if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
-		velocity_error(vptr, isr_status);
-
 	/*
 	 * Do rx and tx twice for performance (taken from the VIA
 	 * out-of-tree driver).
@@ -2194,7 +2186,16 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance)
 	struct velocity_info *vptr = netdev_priv(dev);
 	u32 isr_status;
 
-	spin_lock(&vptr->lock);
+	/* Check if the lock is taken, and if so ignore the interrupt. This
+	 * can happen with shared interrupts, where the other device can
+	 * interrupt during velocity_poll (where the lock is held).
+	 *
+	 * With spinlock debugging active on a uniprocessor, this will give
+	 * a warning which can safely be ignored.
+	 */
+	if (!spin_trylock(&vptr->lock))
+		return IRQ_NONE;
+
 	isr_status = mac_read_isr(vptr->mac_regs);
 
 	/* Not us ? */
@@ -2203,10 +2204,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance)
 		return IRQ_NONE;
 	}
 
+	/* Ack the interrupt */
+	mac_write_isr(vptr->mac_regs, isr_status);
+
 	if (likely(napi_schedule_prep(&vptr->napi))) {
 		mac_disable_int(vptr->mac_regs);
 		__napi_schedule(&vptr->napi);
 	}
+
+	if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
+		velocity_error(vptr, isr_status);
+
 	spin_unlock(&vptr->lock);
 
 	return IRQ_HANDLED;
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 2/3] via-velocity: Take spinlock on set coalesce
From: Simon Kagstrom @ 2010-02-05 15:55 UTC (permalink / raw)
  To: netdev, davem; +Cc: davej, ben
In-Reply-To: <20100205165253.3f316b98@marrow.netinsight.se>

velocity_set_coalesce touches ISR and some other sensitive registers not
covered by the rtnl lock, so take the velocity spinlock.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
 drivers/net/via-velocity.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 5c73673..5e213f7 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -3341,6 +3341,7 @@ static int velocity_set_coalesce(struct net_device *dev,
 {
 	struct velocity_info *vptr = netdev_priv(dev);
 	int max_us = 0x3f * 64;
+	unsigned long flags;
 
 	/* 6 bits of  */
 	if (ecmd->tx_coalesce_usecs > max_us)
@@ -3362,6 +3363,7 @@ static int velocity_set_coalesce(struct net_device *dev,
 			ecmd->tx_coalesce_usecs);
 
 	/* Setup the interrupt suppression and queue timers */
+	spin_lock_irqsave(&vptr->lock, flags);
 	mac_disable_int(vptr->mac_regs);
 	setup_adaptive_interrupts(vptr);
 	setup_queue_timers(vptr);
@@ -3369,6 +3371,7 @@ static int velocity_set_coalesce(struct net_device *dev,
 	mac_write_int_mask(vptr->int_mask, vptr->mac_regs);
 	mac_clear_isr(vptr->mac_regs);
 	mac_enable_int(vptr->mac_regs);
+	spin_unlock_irqrestore(&vptr->lock, flags);
 
 	return 0;
 }
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 1/3] via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv
From: Simon Kagstrom @ 2010-02-05 15:54 UTC (permalink / raw)
  To: netdev, davem; +Cc: davej, ben
In-Reply-To: <20100205165253.3f316b98@marrow.netinsight.se>

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
 drivers/net/via-velocity.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index c963277..5c73673 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status)
 /**
  *	tx_srv		-	transmit interrupt service
  *	@vptr; Velocity
- *	@status:
  *
  *	Scan the queues looking for transmitted packets that
  *	we can complete and clean up. Update any statistics as
  *	necessary/
  */
-static int velocity_tx_srv(struct velocity_info *vptr, u32 status)
+static int velocity_tx_srv(struct velocity_info *vptr)
 {
 	struct tx_desc *td;
 	int qnum;
@@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
 /**
  *	velocity_rx_srv		-	service RX interrupt
  *	@vptr: velocity
- *	@status: adapter status (unused)
  *
  *	Walk the receive ring of the velocity adapter and remove
  *	any received packets from the receive queue. Hand the ring
  *	slots back to the adapter for reuse.
  */
-static int velocity_rx_srv(struct velocity_info *vptr, int status,
-		int budget_left)
+static int velocity_rx_srv(struct velocity_info *vptr, int budget_left)
 {
 	struct net_device_stats *stats = &vptr->dev->stats;
 	int rd_curr = vptr->rx.curr;
@@ -2165,10 +2162,10 @@ static int velocity_poll(struct napi_struct *napi, int budget)
 	 * Do rx and tx twice for performance (taken from the VIA
 	 * out-of-tree driver).
 	 */
-	rx_done = velocity_rx_srv(vptr, isr_status, budget / 2);
-	velocity_tx_srv(vptr, isr_status);
-	rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done);
-	velocity_tx_srv(vptr, isr_status);
+	rx_done = velocity_rx_srv(vptr, budget / 2);
+	velocity_tx_srv(vptr);
+	rx_done += velocity_rx_srv(vptr, budget - rx_done);
+	velocity_tx_srv(vptr);
 
 	spin_unlock(&vptr->lock);
 
@@ -3100,7 +3097,7 @@ static int velocity_resume(struct pci_dev *pdev)
 	velocity_init_registers(vptr, VELOCITY_INIT_WOL);
 	mac_disable_int(vptr->mac_regs);
 
-	velocity_tx_srv(vptr, 0);
+	velocity_tx_srv(vptr);
 
 	for (i = 0; i < vptr->tx.numq; i++) {
 		if (vptr->tx.used[i])
-- 
1.6.0.4



^ permalink raw reply related

* [PATCH 0/3]: via-velocity: Fixes for locking issues
From: Simon Kagstrom @ 2010-02-05 15:52 UTC (permalink / raw)
  To: netdev, davem, davej, ben

Hi!

This series of patches fixes a set of locking issues in the
via-velocity driver. Since some of the problems were introduced in
2.6.33-rc1 (with my patches, sorry!), it would be good if they could
get in before the final 2.6.33 release.

The patches are (the third one is the complex one):

  * A small cleanup to remove unused parameters for rx_srv and tx_srv

  * Take the spinlock from set_coalesce

  * Fix races that occur with shared interrupts

We have a system where the interrupt for the VIA card is shared with a
USB controller. The last patch fixes a deadlock situation, which we can
trigger on our UP with spinlock debugging, where the VIA driver is
executing in velocity_poll (the NAPI poll callback) when the USB
controller interrupts the CPU. Since the interrupt controller takes the
(already held) lock, it will deadlock.


Some questions about the implementation though:

The patch uses spin_trylock in the interrupt handler, and returns
IRQ_NONE if it's already held. Here is a place where I'm unsure about
the right way though. Another alternative is to use spin_lock_irqsave
in velocity_poll(), but I'd like to avoid turning the interrupts off
for "long" periods of time when the actual velocity interrupt can't
happen anyway (since it is turned off while executing velocity_poll().

With spin_trylock and spinlock debugging on our UP, we get a bug from
the debugging code:

  BUG: spinlock trylock failure on UP on CPU#0, swapper/0

which looking at the debug code isn't unexpected since spin_trylock is
called from an interrupt handler. In this case though, I don't think
this is an actual error.


We don't have access to any multiprocessor machine with a VIA NIC (I
guess they are not very common), so I haven't been able to test these
patches on actual SMP hardware.

The locking in via-velocity in general would be good to look over, I
think.

// Simon

^ permalink raw reply

* Re: [PATCH] obsolete config in kernel source (HSO_AUTOPM)
From: Christoph Egger @ 2010-02-05 15:14 UTC (permalink / raw)
  To: Paulius Zaleckas
  Cc: Jan Dumon, Greg Kroah-Hartman, David S. Miller, Stephen Hemminger,
	netdev
In-Reply-To: <4B6C2D78.20603@gmail.com>

On Fri, Feb 05, 2010 at 04:38:48PM +0200, Paulius Zaleckas wrote:
> On 02/05/2010 03:39 PM, Christoph Egger wrote:
> >Hi all!
> >
> >	As part of the VAMOS[0] research project at the University of
> >Erlangen we're checking referential integrity between kernel KConfig
> >options and in-code Conditional blocks.
> >
> >	This is just a one-liner commented out unconditionally (due to
> >the config not existing) and being like this for virtually ever so I'm
> >suggesting to remove it from the kernel tree.
> >
> >	Please keep me informed of this patch getting confirmed /
> >merged so we can keep track of it.
> >
> >diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> >index 6895f15..be0cc99 100644
> >--- a/drivers/net/usb/hso.c
> >+++ b/drivers/net/usb/hso.c
> >@@ -1155,9 +1155,6 @@ static void _hso_serial_set_termios(struct tty_struct *tty,
> >  static void hso_resubmit_rx_bulk_urb(struct hso_serial *serial, struct urb *urb)
> >  {
> >  	int result;
> >-#ifdef CONFIG_HSO_AUTOPM
> >-	usb_mark_last_busy(urb->dev);
> >-#endif
> 
> Acctually this is bug. usb_mark_last_busy() should be called here.
> Can you resend this patch by just removing #ifdef and #endif and
> leaving usb_mark_last_busy()?

OK here comes the updated patch

-----
>From f9797bb502566cd9e4db8b1bb7bb213f7f1d64ed Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Fri, 5 Feb 2010 16:10:29 +0100
Subject: [PATCH] Remove unreferenced HSO_AUTOPM

CONFIG_HSO_AUTOPM is not set by KConfig / set in the Kernel source,
makefiles and won't be ever set this way. However the unreachable code
is actually needed as reported by Paulius Zaleckas so just removing
the checks.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
 drivers/net/usb/hso.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 6895f15..de466ee 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1155,9 +1155,7 @@ static void _hso_serial_set_termios(struct tty_struct *tty,
 static void hso_resubmit_rx_bulk_urb(struct hso_serial *serial, struct urb *urb)
 {
 	int result;
-#ifdef CONFIG_HSO_AUTOPM
 	usb_mark_last_busy(urb->dev);
-#endif
 	/* We are done with this URB, resubmit it. Prep the USB to wait for
 	 * another frame */
 	usb_fill_bulk_urb(urb, serial->parent->usb,
-- 
1.6.3.3



^ permalink raw reply related

* Re: [PATCH] obsolete config in kernel source (HSO_AUTOPM)
From: Paulius Zaleckas @ 2010-02-05 14:38 UTC (permalink / raw)
  To: Christoph Egger
  Cc: Jan Dumon, Greg Kroah-Hartman, David S. Miller, Stephen Hemminger,
	netdev
In-Reply-To: <20100205133918.GA7077__48535.5327524759$1265377184$gmane$org@faui49.informatik.uni-erlangen.de>

On 02/05/2010 03:39 PM, Christoph Egger wrote:
> Hi all!
>
> 	As part of the VAMOS[0] research project at the University of
> Erlangen we're checking referential integrity between kernel KConfig
> options and in-code Conditional blocks.
>
> 	This is just a one-liner commented out unconditionally (due to
> the config not existing) and being like this for virtually ever so I'm
> suggesting to remove it from the kernel tree.
>
> 	Please keep me informed of this patch getting confirmed /
> merged so we can keep track of it.
>
> Regards
>
> 	Christoph Egger
>
> [0] http://vamos1.informatik.uni-erlangen.de/
>
> ----
>  From 4d76c063b34cffd7b0f175e328f0878f262e6af2 Mon Sep 17 00:00:00 2001
> From: Christoph Egger<siccegge@stud.informatik.uni-erlangen.de>
> Date: Fri, 5 Feb 2010 13:46:21 +0100
> Subject: [PATCH] Remove unreferenced HSO_AUTOPM
>
> CONFIG_HSO_AUTOPM is set by KConfig / set in the Kernel source,
> makefiles and won't be ever set this way, therefor simply removing the
> protected code.
>
> Signed-off-by: Christoph Egger<siccegge@stud.informatik.uni-erlangen.de>
> ---
>   drivers/net/usb/hso.c |    3 ---
>   1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index 6895f15..be0cc99 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -1155,9 +1155,6 @@ static void _hso_serial_set_termios(struct tty_struct *tty,
>   static void hso_resubmit_rx_bulk_urb(struct hso_serial *serial, struct urb *urb)
>   {
>   	int result;
> -#ifdef CONFIG_HSO_AUTOPM
> -	usb_mark_last_busy(urb->dev);
> -#endif

Acctually this is bug. usb_mark_last_busy() should be called here.
Can you resend this patch by just removing #ifdef and #endif and
leaving usb_mark_last_busy()?

>   	/* We are done with this URB, resubmit it. Prep the USB to wait for
>   	 * another frame */
>   	usb_fill_bulk_urb(urb, serial->parent->usb,


^ permalink raw reply

* Re: [PATCH] obsolete config in kernel source (USE_INTERNAL_TIMER)
From: roel kluin @ 2010-02-05 14:16 UTC (permalink / raw)
  To: Christoph Egger
  Cc: Samuel Ortiz, David S. Miller, Stephen Hemminger, Andrew Morton,
	Patrick McHardy, netdev, linux-kernel, vamos
In-Reply-To: <20100205132219.GA6874@faui49.informatik.uni-erlangen.de>

>        As part of the VAMOS[0] research project at the University of
> Erlangen we're checking referential integrity between kernel KConfig
> options and in-code Conditional blocks.
>
>        USE_INTERNAL_TIMER is another candidate. As can be seen on the
> comment of the #undef instruction this part was quite likely never
> working and safeguards were added si it is never enabled.
>
>        Please keep me informed of this patch getting confirmed /
> merged so we can keep track of it.
>
> Regards
>
>        Christoph Egger
>
> [0] http://vamos1.informatik.uni-erlangen.de/
>
> ----
> From f027b61661aaac1fd58536e17894e486d5fb3d3f Mon Sep 17 00:00:00 2001
> From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
> Date: Fri, 5 Feb 2010 13:11:16 +0100
> Subject: [PATCH] USE_INTERNAL_TIMER explicitely #undef-ed and not in kconfig
>
> CONFIG_USE_INTERNAL_TIMER seems to be the remainings of some
> experiment. It is explicitely #undef-ed as not working, only
> referenced from one source file and rather aged.
>
> Hereby cleaning it from the kernel tree.
>
> Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>

Looks correct to me,

Acked-by: Roel Kluin <roel.kluin@gmail.com>

^ permalink raw reply

* Gianfar driver failing on MPC8641D based board
From: Martyn Welch @ 2010-02-05 14:00 UTC (permalink / raw)
  To: linuxppc-dev list, netdev; +Cc: Anton Vorontsov, Sandeep Gopalpet, davem

I have recently attempted to boot an 8641D based board from an NFS root.
The boot process grinds to a halt not long after the first access of the
NFS root and I receive multiple "nfs: server 192.168.0.1 not responding,
still trying" messages. Wireshark suggests that there is no further
traffic from this board at this point on. The NFS server seems to
eventually try sending duplicate packets it's already sent, which
results in "nfs: server 192.168.0.1 OK" messages, but the "not
responding" messages resume with no further traffic from the board.

I am able to boot to a ramdisk fine and the network seems to work -
though I haven't really pushed the interface from it.

I have attempted to git bisect, though I wasn't able to get much further
than discovering the problem was introduced in the 2.6.33 merge window -
at which point the gianfar network driver fails to compile (I have tried
to git bisect skip many, many times to no avail).

NFS booting fails for this board on todays linux-next, the master branch
of Kumar's PPC tree and the head of the main tree. I have also been able
to NFS boot from a random x86 based board that I have, using the head of
the main tree and the linux-next tree.

Copying the gianfar drivers from 2.6.32 into the head of the main tree
restores the correct behaviour and I'm able to NFS boot. I have heard
from others that the latest drivers work on 83xx and 85xx based boards,
but it seems to be broken on at least the 8641D.

I can see there has been a fair amount of work done on the gianfar
driver, I assume that this is a bug introduced by the multiple queue
support, but I'm way out of my depth on this.

I'm also off for the next week - so if I'm quiet, it'll be because of that.

Martyn

-- 
Martyn Welch (Principal Software Engineer)   |   Registered in England and
GE Intelligent Platforms                     |   Wales (3828642) at 100
T +44(0)127322748                            |   Barbirolli Square, Manchester,
E martyn.welch@ge.com                        |   M2 3AB  VAT:GB 927559189

^ permalink raw reply

* [PATCH] obsolete config in kernel source (HSO_AUTOPM)
From: Christoph Egger @ 2010-02-05 13:39 UTC (permalink / raw)
  To: Jan Dumon, Greg Kroah-Hartman, David S. Miller, Stephen Hemminger,
	Paulius Zaleckas <paulius.zal
  Cc: vamos

Hi all!

	As part of the VAMOS[0] research project at the University of
Erlangen we're checking referential integrity between kernel KConfig
options and in-code Conditional blocks.

	This is just a one-liner commented out unconditionally (due to
the config not existing) and being like this for virtually ever so I'm
suggesting to remove it from the kernel tree.

	Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.

Regards

	Christoph Egger

[0] http://vamos1.informatik.uni-erlangen.de/

----
>From 4d76c063b34cffd7b0f175e328f0878f262e6af2 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Fri, 5 Feb 2010 13:46:21 +0100
Subject: [PATCH] Remove unreferenced HSO_AUTOPM

CONFIG_HSO_AUTOPM is set by KConfig / set in the Kernel source,
makefiles and won't be ever set this way, therefor simply removing the
protected code.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
 drivers/net/usb/hso.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 6895f15..be0cc99 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1155,9 +1155,6 @@ static void _hso_serial_set_termios(struct tty_struct *tty,
 static void hso_resubmit_rx_bulk_urb(struct hso_serial *serial, struct urb *urb)
 {
 	int result;
-#ifdef CONFIG_HSO_AUTOPM
-	usb_mark_last_busy(urb->dev);
-#endif
 	/* We are done with this URB, resubmit it. Prep the USB to wait for
 	 * another frame */
 	usb_fill_bulk_urb(urb, serial->parent->usb,
-- 
1.6.3.3




^ permalink raw reply related

* [PATCH] obsolete config in kernel source (USE_INTERNAL_TIMER)
From: Christoph Egger @ 2010-02-05 13:22 UTC (permalink / raw)
  To: Samuel Ortiz, David S. Miller, Stephen Hemminger, Andrew Morton,
	Patrick McHardy <kabe
  Cc: vamos

Hi all!

	As part of the VAMOS[0] research project at the University of
Erlangen we're checking referential integrity between kernel KConfig
options and in-code Conditional blocks.

	USE_INTERNAL_TIMER is another candidate. As can be seen on the
comment of the #undef instruction this part was quite likely never
working and safeguards were added si it is never enabled.

	Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.

Regards

	Christoph Egger

[0] http://vamos1.informatik.uni-erlangen.de/

----
>From f027b61661aaac1fd58536e17894e486d5fb3d3f Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Fri, 5 Feb 2010 13:11:16 +0100
Subject: [PATCH] USE_INTERNAL_TIMER explicitely #undef-ed and not in kconfig

CONFIG_USE_INTERNAL_TIMER seems to be the remainings of some
experiment. It is explicitely #undef-ed as not working, only
referenced from one source file and rather aged.

Hereby cleaning it from the kernel tree.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
 drivers/net/irda/w83977af_ir.c |   36 ------------------------------------
 1 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 551810f..980625f 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -65,7 +65,6 @@
 #undef  CONFIG_NETWINDER_TX_DMA_PROBLEMS /* Not needed */
 #define CONFIG_NETWINDER_RX_DMA_PROBLEMS /* Must have this one! */
 #endif
-#undef  CONFIG_USE_INTERNAL_TIMER  /* Just cannot make that timer work */
 #define CONFIG_USE_W977_PNP        /* Currently needed */
 #define PIO_MAX_SPEED       115200 
 
@@ -533,25 +532,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
 		self->tx_buff.len = skb->len;
 		
 		mtt = irda_get_mtt(skb);
-#ifdef CONFIG_USE_INTERNAL_TIMER
-	        if (mtt > 50) {
-			/* Adjust for timer resolution */
-			mtt /= 1000+1;
-
-			/* Setup timer */
-			switch_bank(iobase, SET4);
-			outb(mtt & 0xff, iobase+TMRL);
-			outb((mtt >> 8) & 0x0f, iobase+TMRH);
-			
-			/* Start timer */
-			outb(IR_MSL_EN_TMR, iobase+IR_MSL);
-			self->io.direction = IO_XMIT;
-			
-			/* Enable timer interrupt */
-			switch_bank(iobase, SET0);
-			outb(ICR_ETMRI, iobase+ICR);
-		} else {
-#endif
 			IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __func__ , jiffies, mtt);
 			if (mtt)
 				udelay(mtt);
@@ -560,9 +540,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
 			switch_bank(iobase, SET0);
 	 		outb(ICR_EDMAI, iobase+ICR);
 	     		w83977af_dma_write(self, iobase);
-#ifdef CONFIG_USE_INTERNAL_TIMER
-		}
-#endif
 	} else {
 		self->tx_buff.data = self->tx_buff.head;
 		self->tx_buff.len = async_wrap_skb(skb, self->tx_buff.data, 
@@ -876,20 +853,7 @@ static int w83977af_dma_receive_complete(struct w83977af_ir *self)
 			/* Check if we have transferred all data to memory */
 			switch_bank(iobase, SET0);
 			if (inb(iobase+USR) & USR_RDR) {
-#ifdef CONFIG_USE_INTERNAL_TIMER
-				/* Put this entry back in fifo */
-				st_fifo->head--;
-				st_fifo->len++;
-				st_fifo->entries[st_fifo->head].status = status;
-				st_fifo->entries[st_fifo->head].len = len;
-				
-				/* Restore set register */
-				outb(set, iobase+SSR);
-			
-				return FALSE; 	/* I'll be back! */
-#else
 				udelay(80); /* Should be enough!? */
-#endif
 			}
 						
 			skb = dev_alloc_skb(len+1);
-- 
1.6.3.3



^ permalink raw reply related

* [PATCH net-next-2.6 4/4] net: e1000e: convert to use mc helpers
From: Jiri Pirko @ 2010-02-05 12:52 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>


Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/e1000e/netdev.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index ffa37c6..88d54d3 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2589,21 +2589,16 @@ static void e1000_set_multi(struct net_device *netdev)
 
 	ew32(RCTL, rctl);
 
-	if (netdev->mc_count) {
-		mta_list = kmalloc(netdev->mc_count * 6, GFP_ATOMIC);
+	if (!netdev_mc_empty(netdev)) {
+		mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
 		if (!mta_list)
 			return;
 
 		/* prepare a packed array of only addresses. */
-		mc_ptr = netdev->mc_list;
-
-		for (i = 0; i < netdev->mc_count; i++) {
-			if (!mc_ptr)
-				break;
-			memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
-			       ETH_ALEN);
-			mc_ptr = mc_ptr->next;
-		}
+		i = 0;
+		netdev_for_each_mc_addr(mc_ptr, netdev)
+			memcpy(mta_list + (i++ * ETH_ALEN),
+			       mc_ptr->dmi_addr, ETH_ALEN);
 
 		e1000_update_mc_addr_list(hw, mta_list, i);
 		kfree(mta_list);
-- 
1.6.6


^ permalink raw reply related

* [PATCH net-next-2.6 3/4] net: dm9601: convert to use mc helpers
From: Jiri Pirko @ 2010-02-05 12:51 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>


Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/usb/dm9601.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 3d406f9..c820fec 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net)
 
 	if (net->flags & IFF_PROMISC) {
 		rx_ctl |= 0x02;
-	} else if (net->flags & IFF_ALLMULTI || net->mc_count > DM_MAX_MCAST) {
+	} else if (net->flags & IFF_ALLMULTI ||
+		   netdev_mc_count(net) > DM_MAX_MCAST) {
 		rx_ctl |= 0x04;
-	} else if (net->mc_count) {
-		struct dev_mc_list *mc_list = net->mc_list;
-		int i;
+	} else if (!netdev_mc_empty(net)) {
+		struct dev_mc_list *mc_list;
 
-		for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) {
+		netdev_for_each_mc_addr(mc_list, net) {
 			u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
 			hashes[crc >> 3] |= 1 << (crc & 0x7);
 		}
-- 
1.6.6


^ permalink raw reply related

* [PATCH net-next-2.6 2/4] net: 8139too: convert to use mc helpers
From: Jiri Pirko @ 2010-02-05 12:48 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>


Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/8139too.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 321e73a..c7d6f09 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -2509,7 +2509,7 @@ static void __set_rx_mode (struct net_device *dev)
 	struct rtl8139_private *tp = netdev_priv(dev);
 	void __iomem *ioaddr = tp->mmio_addr;
 	u32 mc_filter[2];	/* Multicast hash filter */
-	int i, rx_mode;
+	int rx_mode;
 	u32 tmp;
 
 	pr_debug("%s:   rtl8139_set_rx_mode(%4.4x) done -- Rx config %8.8lx.\n",
@@ -2521,7 +2521,7 @@ static void __set_rx_mode (struct net_device *dev)
 		    AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
 		    AcceptAllPhys;
 		mc_filter[1] = mc_filter[0] = 0xffffffff;
-	} else if ((dev->mc_count > multicast_filter_limit) ||
+	} else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
 		   (dev->flags & IFF_ALLMULTI)) {
 		/* Too many to filter perfectly -- accept all multicasts. */
 		rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -2530,8 +2530,7 @@ static void __set_rx_mode (struct net_device *dev)
 		struct dev_mc_list *mclist;
 		rx_mode = AcceptBroadcast | AcceptMyPhys;
 		mc_filter[1] = mc_filter[0] = 0;
-		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
-		     i++, mclist = mclist->next) {
+		netdev_for_each_mc_addr(mclist, dev) {
 			int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
 
 			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
-- 
1.6.6


^ permalink raw reply related

* [PATCH net-next-2.6 1/4] net: 8139cp: convert to use mc helpers
From: Jiri Pirko @ 2010-02-05 12:47 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>


Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/8139cp.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 9d59654..60bc0b0 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -899,7 +899,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	u32 mc_filter[2];	/* Multicast hash filter */
-	int i, rx_mode;
+	int rx_mode;
 	u32 tmp;
 
 	/* Note: do not reorder, GCC is clever about common statements. */
@@ -909,7 +909,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
 		    AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
 		    AcceptAllPhys;
 		mc_filter[1] = mc_filter[0] = 0xffffffff;
-	} else if ((dev->mc_count > multicast_filter_limit) ||
+	} else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
 		   (dev->flags & IFF_ALLMULTI)) {
 		/* Too many to filter perfectly -- accept all multicasts. */
 		rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -918,8 +918,7 @@ static void __cp_set_rx_mode (struct net_device *dev)
 		struct dev_mc_list *mclist;
 		rx_mode = AcceptBroadcast | AcceptMyPhys;
 		mc_filter[1] = mc_filter[0] = 0;
-		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
-		     i++, mclist = mclist->next) {
+		netdev_for_each_mc_addr(mclist, dev) {
 			int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
 
 			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
-- 
1.6.6


^ permalink raw reply related

* [PATCH net-next-2.6 0/4] net: convert to use mc helpers round 1
From: Jiri Pirko @ 2010-02-05 12:46 UTC (permalink / raw)
  To: netdev; +Cc: davem

Hi.

I started with drivers I use daily. There are four of them.

Jirka

^ permalink raw reply

* Re: [RFC Patch] net: reserve ports for applications using fixed port numbers
From: Octavian Purdila @ 2010-02-05 12:28 UTC (permalink / raw)
  To: Cong Wang
  Cc: Tetsuo Handa, davem, linux-kernel, eric.dumazet, linux-rdma,
	netdev, nhorman, linux-sctp
In-Reply-To: <4B6BB447.8080806@redhat.com>

On Friday 05 February 2010 08:01:43 you wrote:

> >> If you can accept his version, I want to use his version (with an
> >> interface for updating above "reserved_ports" by not only root user's
> >> sysctl() but also MAC's policy configuration).
> >
> > I think that simply using an interface to update the reserved_ports from
> > MAC policy configuration module wouldn't work, as root will be able to
> > modify the policy via sysctl.
> >
> > I think that we might need to:
> >
> > a) have a reserved_port updater
> >
> > b) put a LSM hook into that
> >
> > c) use the reserved_port updater from sysctl
> 
> Ideally, you'd provide an interface for port allocator to use, so
> doing port reservation will be easier.
> 

If I understand the TOMOYO requirements correctly, we need a way to restrict a 
user action based on some security policy (in this case the ability to clear 
reserved ports). Traditionally that has been done with LSM hooks, so I think 
that approach is preferable.

^ permalink raw reply

* Re: [RFC Patch] net: reserve ports for applications using fixed port numbers
From: Octavian Purdila @ 2010-02-05 12:05 UTC (permalink / raw)
  To: Cong Wang
  Cc: David Miller, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	nhorman-2XuSBdqkA4R54TAoqtyWWQ, linux-sctp-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4B6BA272.4090405-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Friday 05 February 2010 06:45:38 you wrote:

> Again, using bitmap algorithm is not a problem and it's better, the
> problem is sysctl interface, how would you plan to interact with users
> via sysctl/proc if you use bitmap to handle this? I would like to hear
> more details about this.
> 

We could use something like positive values for setting and negative for reset 
(e.g. 3 would set the port in the bitmap and -3 would reset it).

But we would need new sysctl and proc handlers to handle the bitmap case (e.g. 
sysctl_bitmap, proc_dobitmap_minmax).
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH for 2.6.33] conntrack: restrict runtime hashsize modifications
From: Jon Masters @ 2010-02-05 11:51 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Alexey Dobriyan, davem, eric.dumazet, netdev, netfilter-devel
In-Reply-To: <4B6BFF69.6050503@trash.net>

On Fri, 2010-02-05 at 12:22 +0100, Patrick McHardy wrote:
> Alexey Dobriyan wrote:
> > On Fri, Feb 5, 2010 at 1:16 PM, Patrick McHardy <kaber@trash.net> wrote:
> >> OK testing looks fine, although I'm quite surprised that its actually
> >> possible to change module parameters from within non-init namespaces.
> >> How is this supposed to work at all? I don't see how sysfs could
> >> possibly provide a network namespace context ...
> > 
> > 
> > You can do in write hook
> > 
> >     if (!net_eq(current->nsproxy->net_ns, &init_net))
> >             return -EINVAL;
> 
> Right, I see. So we could actually make resizing work for all
> namespaces quite easily. Is there any reason not to do this?

Yes, but I think (2.6.34) there also needs to be a better way to expose
netns topology and visualize all the hashtables on a system - if you're
the admin you really want to be able to see all of them, not just for a
particular namespace you might be in, in addition to the perns views.

We already discussed 2.6.34, I'm only mentioning this "for the record".

Jon.



^ permalink raw reply

* Re: linux-next: build failure after merge of the net tree
From: Stephen Rothwell @ 2010-02-05 11:49 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-next, linux-kernel, nicholasx.d.nunley
In-Reply-To: <20100204.223255.146893399.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

Hi Dave,

On Thu, 04 Feb 2010 22:32:55 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> Damn namespace pollution, this is one of a zillion reasons
> I prefer drivers are written in one sorce file, then people
> can name their functions however they like and they're all
> marked static so it doesn't cause problems like this.
> 
> I've fixed it up as follows in net-next-2.6

Looks good, thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: [PATCH 11/13] net: irda: use seq_list_foo() helpers
From: Paulius Zaleckas @ 2010-02-05 11:46 UTC (permalink / raw)
  To: Li Zefan; +Cc: David Miller, Andrew Morton, LKML, netdev@vger.kernel.org
In-Reply-To: <4B6B78AD.1030809@cn.fujitsu.com>

On 02/05/2010 03:47 AM, Li Zefan wrote:
[...]
>   /* Return entry after v, and increment pos */
> @@ -1148,14 +1137,7 @@ static void *irlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)
>   {
>   	struct list_head *nxt;

you should remove nxt declaration.

> -	++*pos;
> -	if (v == SEQ_START_TOKEN)
> -		nxt = irlans.next;
> -	else
> -		nxt = ((struct irlan_cb *)v)->dev_list.next;
> -
> -	return (nxt ==&irlans) ? NULL
> -		: list_entry(nxt, struct irlan_cb, dev_list);
> +	return seq_list_next(v,&irlans, pos);
>   }
[...]

^ permalink raw reply

* Re: [PATCH for 2.6.33] conntrack: restrict runtime hashsize  modifications
From: Patrick McHardy @ 2010-02-05 11:25 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: davem, jonathan, eric.dumazet, netdev, netfilter-devel
In-Reply-To: <4B6BFF69.6050503@trash.net>

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Patrick McHardy wrote:
> Alexey Dobriyan wrote:
>> On Fri, Feb 5, 2010 at 1:16 PM, Patrick McHardy <kaber@trash.net> wrote:
>>> OK testing looks fine, although I'm quite surprised that its actually
>>> possible to change module parameters from within non-init namespaces.
>>> How is this supposed to work at all? I don't see how sysfs could
>>> possibly provide a network namespace context ...
>>
>> You can do in write hook
>>
>>     if (!net_eq(current->nsproxy->net_ns, &init_net))
>>             return -EINVAL;
> 
> Right, I see. So we could actually make resizing work for all
> namespaces quite easily. Is there any reason not to do this?
> 

Something like this (untested) patch on top of the previous one.

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 2117 bytes --]

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index ef1c856..212dac3 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -31,6 +31,7 @@
 #include <linux/socket.h>
 #include <linux/mm.h>
 #include <linux/rculist_nulls.h>
+#include <linux/nsproxy.h>
 
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l3proto.h>
@@ -1194,6 +1195,7 @@ int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
 	unsigned int hashsize, old_size;
 	struct hlist_nulls_head *hash, *old_hash;
 	struct nf_conntrack_tuple_hash *h;
+	struct net *net = current->nsproxy->net_ns;
 
 	/* On boot, we can set this without any fancy locking. */
 	if (!nf_conntrack_htable_size)
@@ -1213,9 +1215,9 @@ int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
 	 * though since that required taking the lock.
 	 */
 	spin_lock_bh(&nf_conntrack_lock);
-	for (i = 0; i < init_net.ct.htable_size; i++) {
-		while (!hlist_nulls_empty(&init_net.ct.hash[i])) {
-			h = hlist_nulls_entry(init_net.ct.hash[i].first,
+	for (i = 0; i < net->ct.htable_size; i++) {
+		while (!hlist_nulls_empty(&net->ct.hash[i])) {
+			h = hlist_nulls_entry(net->ct.hash[i].first,
 					struct nf_conntrack_tuple_hash, hnnode);
 			hlist_nulls_del_rcu(&h->hnnode);
 			bucket = __hash_conntrack(&h->tuple, hashsize,
@@ -1223,13 +1225,13 @@ int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
 			hlist_nulls_add_head_rcu(&h->hnnode, &hash[bucket]);
 		}
 	}
-	old_size = init_net.ct.htable_size;
-	old_vmalloced = init_net.ct.hash_vmalloc;
-	old_hash = init_net.ct.hash;
+	old_size = net->ct.htable_size;
+	old_vmalloced = net->ct.hash_vmalloc;
+	old_hash = net->ct.hash;
 
-	init_net.ct.htable_size = nf_conntrack_htable_size = hashsize;
-	init_net.ct.hash_vmalloc = vmalloced;
-	init_net.ct.hash = hash;
+	net->ct.htable_size = nf_conntrack_htable_size = hashsize;
+	net->ct.hash_vmalloc = vmalloced;
+	net->ct.hash = hash;
 	spin_unlock_bh(&nf_conntrack_lock);
 
 	nf_ct_free_hashtable(old_hash, old_vmalloced, old_size);

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox