Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] Use list_head-s in inetpeer.c
From: Pavel Emelyanov @ 2007-11-12  8:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, devel
In-Reply-To: <20071110.213107.94486766.davem@davemloft.net>

David Miller wrote:
> From: Pavel Emelyanov <xemul@openvz.org>
> Date: Sat, 10 Nov 2007 17:32:58 +0300
> 
>> The inetpeer.c tracks the LRU list of inet_perr-s, but makes
>> it by hands. Use the list_head-s for this.
>>
>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> This makes every inetpeer struct consume 8 more bytes, and on some
> systems we have can have many of these objects active.  That space
> savings is why this was done the way it was.

No. I remove _two_ pointers unused_next and unused_prevp, and add
the list_head, which is _two_ pointers as well. I've even checked the
compilation on both i386 and x86_64 - the sizeof(struct inet_peer) 
is not changed.

You must have overlooked the unused_prevp member, because it is 
declared in the same line as the unused_next. Or I miss something else?

> It would be nice to have "tailq" like interfaces in linux/list.h
> for situations like this.
> 
> Please do not submit a patch implementing that until the 2.6.25
> merge window, however, thanks.

If my explanation above is correct, should I delay this patch until
the 2.6.25 anyway?

Thanks,
Pavel

^ permalink raw reply

* Re: [2.6 patch] net/ipv4/ipvs/: remove unused exports
From: David Miller @ 2007-11-12  8:01 UTC (permalink / raw)
  To: bunk; +Cc: horms, rumen, wensong, ja, netdev, linux-kernel, lvs-devel
In-Reply-To: <20071112075836.GE9771@stusta.de>

From: Adrian Bunk <bunk@kernel.org>
Date: Mon, 12 Nov 2007 08:58:36 +0100

> On Sun, Nov 11, 2007 at 04:09:40PM +0900, Simon Horman wrote:
> > On Sun, Nov 11, 2007 at 07:48:40AM +0100, Adrian Bunk wrote:
> > > This patch removes the following unused EXPORT_SYMBOL's:
> > > - ip_vs_try_bind_dest
> > > - ip_vs_find_dest
> > > 
> > > Signed-off-by: Adrian Bunk <bunk@kernel.org>
> > 
> > Looks fine to me.
> > 
> > Should Dave Miller put this in his tree,
> > or do you want to handle it a different way?
> >...
> 
> If Dave applies it that would be perfect.

I will do this.

^ permalink raw reply

* Re: [2.6 patch] net/ipv4/ipvs/: remove unused exports
From: Adrian Bunk @ 2007-11-12  7:58 UTC (permalink / raw)
  To: Simon Horman
  Cc: Rumen G. Bogdanovski, wensong, ja, netdev, linux-kernel,
	David S. Miller, LVS Development mailing list
In-Reply-To: <20071111070939.GA25304@verge.net.au>

On Sun, Nov 11, 2007 at 04:09:40PM +0900, Simon Horman wrote:
> On Sun, Nov 11, 2007 at 07:48:40AM +0100, Adrian Bunk wrote:
> > This patch removes the following unused EXPORT_SYMBOL's:
> > - ip_vs_try_bind_dest
> > - ip_vs_find_dest
> > 
> > Signed-off-by: Adrian Bunk <bunk@kernel.org>
> 
> Looks fine to me.
> 
> Should Dave Miller put this in his tree,
> or do you want to handle it a different way?
>...

If Dave applies it that would be perfect.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply

* [PATCH] - in.h - IP4_ADDR
From: Joe Perches @ 2007-11-12  3:19 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Fred L. Templin

Add inline functions to in.h that make the IP4 address tests
a bit easier to read and also add some type safety.

gcc optimizes IP4_ADDR to a constant (O2 or Os)

Signed-off-by: Joe Perches <joe@perches.com

---

 include/linux/in.h |   75 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 70 insertions(+), 5 deletions(-)

diff --git a/include/linux/in.h b/include/linux/in.h
index 3975cbf..17d1878 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -247,11 +247,76 @@ struct sockaddr_in {
 
 #ifdef __KERNEL__
 /* Some random defines to make it easier in the kernel.. */
-#define LOOPBACK(x)	(((x) & htonl(0xff000000)) == htonl(0x7f000000))
-#define MULTICAST(x)	(((x) & htonl(0xf0000000)) == htonl(0xe0000000))
-#define BADCLASS(x)	(((x) & htonl(0xf0000000)) == htonl(0xf0000000))
-#define ZERONET(x)	(((x) & htonl(0xff000000)) == htonl(0x00000000))
-#define LOCAL_MCAST(x)	(((x) & htonl(0xFFFFFF00)) == htonl(0xE0000000))
+
+static inline __be32 IP4_ADDR(unsigned char a, unsigned char b, unsigned char c, unsigned char d)
+{
+	return htonl((((__u32)(a & 0xff)) << 24) |
+		     (((__u32)(b & 0xff)) << 16) |
+		     (((__u32)(c & 0xff)) << 8) |
+		     (((__u32)(d & 0xff)) << 0));
+}
+
+static inline bool LOOPBACK(__be32 x)
+{
+	return (x & IP4_ADDR(255,0,0,0)) == IP4_ADDR(127,0,0,0);
+}
+
+static inline bool MULTICAST(__be32 x)
+{
+	return (x & IP4_ADDR(240,0,0,0)) == IP4_ADDR(224,0,0,0);
+}
+
+static inline bool BADCLASS(__be32 x)
+{
+	return (x & IP4_ADDR(240,0,0,0)) == IP4_ADDR(240,0,0,0);
+}
+
+static inline bool ZERONET(__be32 x)
+{
+	return (x & IP4_ADDR(255,0,0,0)) == IP4_ADDR(0,0,0,0);
+}
+
+static inline bool LOCAL_MCAST(__be32 x)
+{
+	return (x & IP4_ADDR(255,255,255,0)) == IP4_ADDR(224,0,0,0);
+}
+
+/* Special-Use IPv4 Addresses (RFC3330) */
+
+static inline bool PRIVATE_10(__be32 x)
+{
+	return (x & IP4_ADDR(255,0,0,0)) == IP4_ADDR(10,0,0,0);
+}
+
+static inline bool PRIVATE_172(__be32 x)
+{
+	return (x & IP4_ADDR(255,240,0,0)) == IP4_ADDR(172,16,0,0);
+}
+
+static inline bool PRIVATE_192(__be32 x)
+{
+	return (x & IP4_ADDR(255,255,0,0)) == IP4_ADDR(192,168,0,0);
+}
+
+static inline bool TEST_192(__be32 x)
+{
+	return (x & IP4_ADDR(255,255,255,0)) == IP4_ADDR(192,0,2,0);
+}
+
+static inline bool TEST_198(__be32 x)
+{
+	return (x & IP4_ADDR(255,254,0,0)) == IP4_ADDR(198,18,0,0);
+}
+
+static inline bool ANYCAST_6TO4(__be32 x)
+{
+	return (x & IP4_ADDR(255,255,255,0)) == IP4_ADDR(192,88,99,0);
+}
+
+static inline bool LINK_169(__be32 x)
+{
+ 	return (x & IP4_ADDR(255,255,0,0)) == IP4_ADDR(169,254,0,0);
+}
 
 #endif
 



^ permalink raw reply related

* [PATCH] Fix memory leak in discard case of sctp_sf_abort_violation()
From: Jesper Juhl @ 2007-11-11 22:57 UTC (permalink / raw)
  To: lksctp developers
  Cc: netdev, Linux Kernel Mailing List, Vlad Yasevich,
	Sridhar Samudrala, Jesper Juhl

From: Jesper Juhl <jesper.juhl@gmail.com>

In net/sctp/sm_statefuns.c::sctp_sf_abort_violation() we may leak 
the storage allocated for 'abort' by returning from the function 
without using or freeing it. This happens in case 
"sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)" is true and we jump to 
the 'discard' label.
Spotted by the Coverity checker.

The simple fix is to simply move the creation of the "abort chunk" 
to after the possible jump to the 'discard' label. This way we don't   
even have to allocate the memory at all in the problem case.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 sm_statefuns.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index f01b408..4c5c5e7 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4064,11 +4064,6 @@ static sctp_disposition_t sctp_sf_abort_violation(
 	struct sctp_chunk *chunk =  arg;
 	struct sctp_chunk *abort = NULL;
 
-	/* Make the abort chunk. */
-	abort = sctp_make_abort_violation(asoc, chunk, payload, paylen);
-	if (!abort)
-		goto nomem;
-
 	/* SCTP-AUTH, Section 6.3:
 	 *    It should be noted that if the receiver wants to tear
 	 *    down an association in an authenticated way only, the
@@ -4083,6 +4078,11 @@ static sctp_disposition_t sctp_sf_abort_violation(
 	if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc))
 		goto discard;
 
+	/* Make the abort chunk. */
+	abort = sctp_make_abort_violation(asoc, chunk, payload, paylen);
+	if (!abort)
+		goto nomem;
+
 	if (asoc) {
 		sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
 		SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);




^ permalink raw reply related

* Re : Oops preceded by WARNING: at net/ipv4/tcp_input.c:1571 tcp_remove_reno_sacks()
From: Ilpo Järvinen @ 2007-11-11 22:40 UTC (permalink / raw)
  To: Chazarain Guillaume; +Cc: David Miller, Netdev
In-Reply-To: <902344.71635.qm@web26211.mail.ukl.yahoo.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 12317 bytes --]

On Sun, 11 Nov 2007, Chazarain Guillaume wrote:

> > Do you have GSO enabled?
>
> According to ethtool -k, no.

Ok, thanks, it excludes lot of possibilities...

> > Is this reproducable?
>
> Unfortunately not, I saw it only once.

The messages you had in the other mail are very likely symptom of the 
same problem, it's just hard to tell from them where it really originates 
from (because it would requires expensive verification that nobody wants 
to do by default after simple operations). In many cases that WARN_ON is 
simply too late to tell when the problem causing adjustment/corruption 
occurred but it's still better than nothing as a starting point :-).

> > You can try to provoke it by setting tcp_sack sysctl 
> >  to 0 as this seems to be non-SACK related... If so, you could try the 
> > debug patch below
>
> > > # CONFIG_DEBUG_LIST is not set

> I'm currently running bittorrent with all of this, I just saw this (for 
> the first time ever), but otherwise it works fine:

WARNING: at net/ipv4/tcp_output.c:1807 tcp_simple_retransmit()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f6a79>] tcp_simple_retransmit+0xfa/0x185
 [<c02fa072>] tcp_v4_err+0x35d/0x4cb
 [<c0301f7d>] icmp_unreach+0x327/0x352

Hmm, that's related to path MTU things... It might have something to do 
with this... I'm not at all sure how it handles pcounts...

> > Have you run memtest recently?
>
> Just ran it with no errors for 6 minutes 30. The box is otherwise stable though.

Yeah, it's more likely a miscount somewhere rather than corruption but 
that wasn't obvious from the first mail...

...but alas, I haven't yet been able to come up with any theory on how 
a miscount could occur....

> I forgot to say that I have a kdump image of the crash (I had to 
> recompile this
>
> 2.6.24-rc2 kernel as I deleted its vmlinux), so I could check that you 
> are right on track with your assertions at the time of the crash.
>
> > +    if (WARN_ON(tcp_write_queue_head(sk) == NULL))
> > +        return;
> 
> (gdb) p sk->sk_write_queue.next
> $11 = (struct sk_buff *) 0xe43a04b0
> (gdb) p &sk->sk_write_queue
> $12 = (struct sk_buff_head *) 0xe43a04b0
> 
> 
> > +    if (WARN_ON(!tp->packets_out))
> > +        return;
> 
> (gdb) p ((struct tcp_sock *) sk)->packets_out
> $13 = 0

Yeah, they are expected, the write_queue is empty. Another cause for 
those could have been corrupted write_queue (that's why I asked for the 
list debugging).

> > +    if (tp->lost_out > tp->packets_out)
> > +        printk(KERN_ERR "Lost underflowed to %u\n", tp->lost_out);
>
> (gdb) p ((struct tcp_sock *) sk)->lost_out
> $14 = 4294967295

Underflows by one. ...We should just find out what causes this and fix 
that and we're done with it. :-)


> Some more gdb output for information:

Thanks about them, though they're not that useful because the problem 
occurred prior to its detection... :-)

> My naive attempt at understanding what's going on:
> 
> My oops starts with:
> BUG: unable to handle kernel NULL pointer dereference at virtual address 
> 00000045
>
>
> gdb tells me the crash is in:
> #0  tcp_xmit_retransmit_queue (sk=0xe43a0440) at 
> net/ipv4/tcp_output.c:1962
> 1962                            __u8 sacked = TCP_SKB_CB(skb)->sacked;
>
> (gdb) p ((struct tcp_skb_cb *)((struct sk_buff *)0)->cb)->sacked
> Cannot access memory at address 0x45
> 
> A 0x45 offset is definitely a ->sacked on a null skb, but:

This is right.

> (gdb) p skb
> $5 = (struct sk_buff *) 0xe43a04b0
>
> which is sk->sk_write_queue so I don't understand why the 
> tcp_for_write_queue_from made an iteration.
>
> I don't know if gdb is playing tricks or if it's because I had to 
> recompile the crashing kernel.

No, it won't happen like that. ...I'd say that gdb is just confused. In 
case packets_out is zero (it occurs after a cumulative ACK only), for sure 
skb will become NULL because the retransmit_skb_hint was cleared due to 
cumulative ACK.

The crash location is the expected one in case packets_out gets zero 
during recovery and lost_out is miscounted/corrupt, as your dump shows.

Anyway, thanks for digging these out.


Here's a bruteforce patch below... Since you had couple of them during 
your overnight test, I'm sure it's relatively easy to catch... The 
first place where the tcp_verify_lost is triggered is the most 
interesting, rest are likely ripples due to that earlier corruption... 
(Hopefully I've placed them this time to places where both queue and 
lost_out states should agree, once did similar patch that had
incorrectly placed some verification calls which caused lot of spurious 
stacktraces :-))

...I left those !packets_out things there to prevent crashing when it 
occurs though it's not the main problem itself.

Please keep the tcp_sack set to 0, and once you have at least one 
stacktrace with it, you could try also with tcp_sack if the same thing 
occurs there as well.

--
[PATCH] TCP DEBUG

- Check if empty queue is passed to xmit_retrans...
- Print lost_out underflow value
- Track lost_out and LOST discrepancies everywhere (costs a bit).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 include/net/tcp.h     |    2 ++
 net/ipv4/tcp_input.c  |   21 +++++++++++++++++++++
 net/ipv4/tcp_ipv4.c   |   19 +++++++++++++++++++
 net/ipv4/tcp_output.c |   14 ++++++++++++++
 4 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index d695cea..a939bd5 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -272,6 +272,8 @@ DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics);
 #define TCP_ADD_STATS_BH(field, val)	SNMP_ADD_STATS_BH(tcp_statistics, field, val)
 #define TCP_ADD_STATS_USER(field, val)	SNMP_ADD_STATS_USER(tcp_statistics, field, val)
 
+extern void			tcp_verify_lost(struct sock *sk);
+
 extern void			tcp_v4_err(struct sk_buff *skb, u32);
 
 extern void			tcp_shutdown (struct sock *sk, int how);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index ca9590f..588b105 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1512,6 +1512,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 		flag |= tcp_mark_lost_retrans(sk, highest_sack_end_seq);
 
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	if ((reord < tp->fackets_out) && icsk->icsk_ca_state != TCP_CA_Loss &&
 	    (!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark)))
@@ -1552,6 +1553,7 @@ static void tcp_add_reno_sack(struct sock *sk)
 	tp->sacked_out++;
 	tcp_check_reno_reordering(sk, 0);
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 }
 
 /* Account for ACK, ACKing some data in Reno Recovery phase. */
@@ -1569,6 +1571,7 @@ static void tcp_remove_reno_sacks(struct sock *sk, int acked)
 	}
 	tcp_check_reno_reordering(sk, acked);
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 }
 
 static inline void tcp_reset_reno_sack(struct tcp_sock *tp)
@@ -1670,6 +1673,7 @@ void tcp_enter_frto(struct sock *sk)
 		tp->retrans_out -= tcp_skb_pcount(skb);
 	}
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	/* Earlier loss recovery underway (see RFC4138; Appendix B).
 	 * The last condition is necessary at least in tp->frto_counter case.
@@ -1727,6 +1731,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
 		}
 	}
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	tp->snd_cwnd = tcp_packets_in_flight(tp) + allowed_segments;
 	tp->snd_cwnd_cnt = 0;
@@ -1812,6 +1817,7 @@ void tcp_enter_loss(struct sock *sk, int how)
 		}
 	}
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	tp->reordering = min_t(unsigned int, tp->reordering,
 					     sysctl_tcp_reordering);
@@ -2044,6 +2050,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets)
 		}
 	}
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 }
 
 /* Account newly detected lost packet(s) */
@@ -2088,6 +2095,7 @@ static void tcp_update_scoreboard(struct sock *sk)
 		tp->scoreboard_skb_hint = skb;
 
 		tcp_verify_left_out(tp);
+		tcp_verify_lost(sk);
 	}
 }
 
@@ -2304,6 +2312,7 @@ static void tcp_try_to_open(struct sock *sk, int flag)
 	struct tcp_sock *tp = tcp_sk(sk);
 
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	if (tp->retrans_out == 0)
 		tp->retrans_stamp = 0;
@@ -2403,6 +2412,7 @@ tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
 
 	/* D. Check consistency of the current state. */
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	/* E. Check state exit conditions. State can be terminated
 	 *    when high_seq is ACKed. */
@@ -2521,6 +2531,12 @@ tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
 	if (do_lost || tcp_head_timedout(sk))
 		tcp_update_scoreboard(sk);
 	tcp_cwnd_down(sk, flag);
+	
+	if (WARN_ON(tcp_write_queue_head(sk) == NULL))
+		return;
+	if (WARN_ON(!tp->packets_out))
+		return;
+	
 	tcp_xmit_retransmit_queue(sk);
 }
 
@@ -2721,6 +2737,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p)
 		sk_stream_free_skb(sk, skb);
 		tcp_clear_all_retrans_hints(tp);
 	}
+	
+	tcp_verify_lost(sk);
 
 	if (flag & FLAG_ACKED) {
 		u32 pkts_acked = prior_packets - tp->packets_out;
@@ -2759,6 +2777,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p)
 #if FASTRETRANS_DEBUG > 0
 	BUG_TRAP((int)tp->sacked_out >= 0);
 	BUG_TRAP((int)tp->lost_out >= 0);
+	if (tp->lost_out > tp->packets_out)
+		printk(KERN_ERR "Lost underflowed to %u\n", tp->lost_out);
 	BUG_TRAP((int)tp->retrans_out >= 0);
 	if (!tp->packets_out && tcp_is_sack(tp)) {
 		icsk = inet_csk(sk);
@@ -2931,6 +2951,7 @@ static int tcp_process_frto(struct sock *sk, int flag)
 	struct tcp_sock *tp = tcp_sk(sk);
 
 	tcp_verify_left_out(tp);
+	tcp_verify_lost(sk);
 
 	/* Duplicate the behavior from Loss state (fastretrans_alert) */
 	if (flag&FLAG_DATA_ACKED)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index e566f3c..5e10d90 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -108,6 +108,25 @@ struct inet_hashinfo __cacheline_aligned tcp_hashinfo = {
 	.lhash_wait  = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.lhash_wait),
 };
 
+void tcp_verify_lost(struct sock *sk)
+{
+	struct tcp_sock *tp = tcp_sk(sk);
+	u32 lost = 0;
+	struct sk_buff *skb;
+
+	tcp_for_write_queue(skb, sk) {
+		if (skb == tcp_send_head(sk))
+			break;
+		if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST)
+			lost += tcp_skb_pcount(skb);
+	}
+	
+	if (WARN_ON(lost != tp->lost_out)) {
+		printk(KERN_ERR "Lost: %u vs %u, %u (%d)\n", lost, tp->lost_out,
+		       tp->packets_out, tcp_is_sack(tp));
+	}
+}
+
 static int tcp_v4_get_port(struct sock *sk, unsigned short snum)
 {
 	return inet_csk_get_port(&tcp_hashinfo, sk, snum,
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 324b420..09260ac 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -779,6 +779,8 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
 	skb_header_release(buff);
 	tcp_insert_write_queue_after(skb, buff, sk);
 
+	tcp_verify_lost(sk);
+
 	return 0;
 }
 
@@ -1443,10 +1445,12 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
 
 	/* Do MTU probing. */
 	if ((result = tcp_mtu_probe(sk)) == 0) {
+		tcp_verify_lost(sk);
 		return 0;
 	} else if (result > 0) {
 		sent_pkts = 1;
 	}
+	tcp_verify_lost(sk);
 
 	while ((skb = tcp_send_head(sk))) {
 		unsigned int limit;
@@ -1767,6 +1771,8 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
 		}
 
 		sk_stream_free_skb(sk, next_skb);
+		
+		tcp_verify_lost(sk);
 	}
 }
 
@@ -1798,6 +1804,8 @@ void tcp_simple_retransmit(struct sock *sk)
 			}
 		}
 	}
+	
+	tcp_verify_lost(sk);
 
 	tcp_clear_all_retrans_hints(tp);
 
@@ -1819,6 +1827,8 @@ void tcp_simple_retransmit(struct sock *sk)
 		tcp_set_ca_state(sk, TCP_CA_Loss);
 	}
 	tcp_xmit_retransmit_queue(sk);
+	
+	tcp_verify_lost(sk);
 }
 
 /* This retransmits one SKB.  Policy decisions and retransmit queue
@@ -2000,6 +2010,8 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
 			}
 		}
 	}
+	
+	tcp_verify_lost(sk);
 
 	/* OK, demanded retransmission is finished. */
 
@@ -2058,6 +2070,8 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
 
 		NET_INC_STATS_BH(LINUX_MIB_TCPFORWARDRETRANS);
 	}
+	
+	tcp_verify_lost(sk);
 }
 
 
-- 
1.5.0.6

^ permalink raw reply related

* Re: [PATCH] NET: Add the helper kernel_sock_shutdown()
From: Mark Fasheh @ 2007-11-11 20:45 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: netdev, Paul Clements, Steve French, David Howells,
	David S Miller
In-Reply-To: <1194806414.11890.2.camel@heimdal.trondhjem.org>

On Sun, Nov 11, 2007 at 01:40:14PM -0500, Trond Myklebust wrote:
> 
> On Sun, 2007-11-11 at 10:03 -0800, Mark Fasheh wrote:
> > That looks pretty good - any objection to naming the enum and using that
> > name in the prototype for kernel_sock_shutdown() so it's even more obvious
> > what type of shutdown argument this expects?
> That would be fine by me. How about the attached patch?

Looks good to me, thanks!

Acked-by: Mark Fasheh <mark.fasheh@oracle.com>
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com

^ permalink raw reply

* Re: [Bugme-new] [Bug 9349] New: RTNLGRP_ND_USEROPT does not report ifindex
From: Andrew Morton @ 2007-11-11 19:59 UTC (permalink / raw)
  To: netdev; +Cc: bugme-daemon, rdenis
In-Reply-To: <bug-9349-10286@http.bugzilla.kernel.org/>

On Sun, 11 Nov 2007 10:52:41 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9349
> 
>            Summary: RTNLGRP_ND_USEROPT does not report ifindex
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.24-rc
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: IPV6
>         AssignedTo: yoshfuji@linux-ipv6.org
>         ReportedBy: rdenis@simphalempin.com
> 
> 
> Most recent kernel where this bug did not occur: none
> Distribution: N/A
> Hardware Environment: any
> Software Environment: any
> Problem Description:
> The RTNLGRP_ND_USEROPT NetLink message introduced in 2.6.24 does not seem to
> include any information as to which netif the user options come from:
> 
> struct nduseroptmsg
> {
>         unsigned char   nduseropt_family;
>         unsigned char   nduseropt_pad1;
>         unsigned short  nduseropt_opts_len; /* Total length of options */
>         __u8            nduseropt_icmp_type;
>         __u8            nduseropt_icmp_code;
>         unsigned short  nduseropt_pad2;
>         /* Followed by one or more ND options */
> };
> 
> Considering this is meant to carry data that is heavily link-layer involved,
> this seems like a feature bug. Could an ifindex field be added there??
> 

^ permalink raw reply

* Re: [PATCH] NET: Add the helper kernel_sock_shutdown()
From: Trond Myklebust @ 2007-11-11 18:40 UTC (permalink / raw)
  To: Mark Fasheh
  Cc: netdev, Paul Clements, Steve French, David Howells,
	David S Miller
In-Reply-To: <20071111180341.GP28607@ca-server1.us.oracle.com>

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


On Sun, 2007-11-11 at 10:03 -0800, Mark Fasheh wrote:
> On Thu, Nov 08, 2007 at 07:01:36PM -0500, Trond Myklebust wrote:
> > From: Trond Myklebust <Trond.Myklebust@netapp.com>
> > 
> > ...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers.
> > 
> > Looking at the sock->op->shutdown() handlers, it looks as if all of them
> > take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the
> > RCV_SHUTDOWN/SEND_SHUTDOWN arguments.
> > Add a helper, and then define the SHUT_* enum to ensure that kernel users
> > of shutdown() don't get confused.
> 
> That looks pretty good - any objection to naming the enum and using that
> name in the prototype for kernel_sock_shutdown() so it's even more obvious
> what type of shutdown argument this expects?
> 	--Mark
> 
> --
> Mark Fasheh
> Senior Software Developer, Oracle
> mark.fasheh@oracle.com

That would be fine by me. How about the attached patch?

Cheers
  Trond


[-- Attachment #2: linux-2.6.24-002-network_add_kernel_sock_shutdown.dif --]
[-- Type: message/rfc822, Size: 5281 bytes --]

From: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: NET: Add the helper kernel_sock_shutdown()
Date: Thu, 8 Nov 2007 18:53:09 -0500
Message-ID: <1194806414.11890.3.camel@heimdal.trondhjem.org>

...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers.

Looking at the sock->op->shutdown() handlers, it looks as if all of them
take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the
RCV_SHUTDOWN/SEND_SHUTDOWN arguments.
Add a helper, and then define the SHUT_* enum to ensure that kernel users
of shutdown() don't get confused.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Paul Clements <Paul.Clements@steeleye.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Steve French <sfrench@samba.org>
Cc: David Howells <dhowells@redhat.com>
Cc: David S Miller <davem@davemloft.net>
---

 drivers/block/nbd.c    |    3 ++-
 fs/cifs/connect.c      |    2 +-
 fs/ocfs2/cluster/tcp.c |    4 ++--
 include/linux/net.h    |    8 ++++++++
 net/rxrpc/ar-local.c   |    4 ++--
 net/socket.c           |    6 ++++++
 6 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 6332aca..b4c0888 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -28,6 +28,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <net/sock.h>
+#include <linux/net.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -126,7 +127,7 @@ static void sock_shutdown(struct nbd_device *lo, int lock)
 	if (lo->sock) {
 		printk(KERN_WARNING "%s: shutting down socket\n",
 			lo->disk->disk_name);
-		lo->sock->ops->shutdown(lo->sock, SEND_SHUTDOWN|RCV_SHUTDOWN);
+		kernel_sock_shutdown(lo->sock, SHUT_RDWR);
 		lo->sock = NULL;
 	}
 	if (lock)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 19ee11f..bea0d2e 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -160,7 +160,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
 	if (server->ssocket) {
 		cFYI(1, ("State: 0x%x Flags: 0x%lx", server->ssocket->state,
 			server->ssocket->flags));
-		server->ssocket->ops->shutdown(server->ssocket, SEND_SHUTDOWN);
+		kernel_sock_shutdown(server->ssocket, SHUT_WR);
 		cFYI(1, ("Post shutdown state: 0x%x Flags: 0x%lx",
 			server->ssocket->state,
 			server->ssocket->flags));
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 685c180..d84bd15 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -58,6 +58,7 @@
 #include <linux/slab.h>
 #include <linux/idr.h>
 #include <linux/kref.h>
+#include <linux/net.h>
 #include <net/tcp.h>
 
 #include <asm/uaccess.h>
@@ -616,8 +617,7 @@ static void o2net_shutdown_sc(struct work_struct *work)
 		del_timer_sync(&sc->sc_idle_timeout);
 		o2net_sc_cancel_delayed_work(sc, &sc->sc_keepalive_work);
 		sc_put(sc);
-		sc->sc_sock->ops->shutdown(sc->sc_sock,
-					   RCV_SHUTDOWN|SEND_SHUTDOWN);
+		kernel_sock_shutdown(sc->sc_sock, SHUT_RDWR);
 	}
 
 	/* not fatal so failed connects before the other guy has our
diff --git a/include/linux/net.h b/include/linux/net.h
index dd79cdb..596131e 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -95,6 +95,12 @@ enum sock_type {
 
 #endif /* ARCH_HAS_SOCKET_TYPES */
 
+enum sock_shutdown_cmd {
+	SHUT_RD		= 0,
+	SHUT_WR		= 1,
+	SHUT_RDWR	= 2,
+};
+
 /**
  *  struct socket - general BSD socket
  *  @state: socket state (%SS_CONNECTED, etc)
@@ -223,6 +229,8 @@ extern int kernel_setsockopt(struct socket *sock, int level, int optname,
 extern int kernel_sendpage(struct socket *sock, struct page *page, int offset,
 			   size_t size, int flags);
 extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
+extern int kernel_sock_shutdown(struct socket *sock,
+				enum sock_shutdown_cmd how);
 
 #ifndef CONFIG_SMP
 #define SOCKOPS_WRAPPED(name) name
diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/ar-local.c
index fe03f71..f3a2bd7 100644
--- a/net/rxrpc/ar-local.c
+++ b/net/rxrpc/ar-local.c
@@ -114,7 +114,7 @@ static int rxrpc_create_local(struct rxrpc_local *local)
 	return 0;
 
 error:
-	local->socket->ops->shutdown(local->socket, 2);
+	kernel_sock_shutdown(local->socket, SHUT_RDWR);
 	local->socket->sk->sk_user_data = NULL;
 	sock_release(local->socket);
 	local->socket = NULL;
@@ -267,7 +267,7 @@ static void rxrpc_destroy_local(struct work_struct *work)
 	/* finish cleaning up the local descriptor */
 	rxrpc_purge_queue(&local->accept_queue);
 	rxrpc_purge_queue(&local->reject_queue);
-	local->socket->ops->shutdown(local->socket, 2);
+	kernel_sock_shutdown(local->socket, SHUT_RDWR);
 	sock_release(local->socket);
 
 	up_read(&rxrpc_local_sem);
diff --git a/net/socket.c b/net/socket.c
index 5d879fd..74784df 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2319,6 +2319,11 @@ int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg)
 	return err;
 }
 
+int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how)
+{
+	return sock->ops->shutdown(sock, how);
+}
+
 /* ABI emulation layers need these two */
 EXPORT_SYMBOL(move_addr_to_kernel);
 EXPORT_SYMBOL(move_addr_to_user);
@@ -2345,3 +2350,4 @@ EXPORT_SYMBOL(kernel_getsockopt);
 EXPORT_SYMBOL(kernel_setsockopt);
 EXPORT_SYMBOL(kernel_sendpage);
 EXPORT_SYMBOL(kernel_sock_ioctl);
+EXPORT_SYMBOL(kernel_sock_shutdown);

^ permalink raw reply related

* Re: [PATCH] NET: Add the helper kernel_sock_shutdown()
From: Mark Fasheh @ 2007-11-11 18:03 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: netdev, Paul Clements, Steve French, David Howells,
	David S Miller
In-Reply-To: <20071109000136.4700.8891.stgit@heimdal.trondhjem.org>

On Thu, Nov 08, 2007 at 07:01:36PM -0500, Trond Myklebust wrote:
> From: Trond Myklebust <Trond.Myklebust@netapp.com>
> 
> ...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers.
> 
> Looking at the sock->op->shutdown() handlers, it looks as if all of them
> take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the
> RCV_SHUTDOWN/SEND_SHUTDOWN arguments.
> Add a helper, and then define the SHUT_* enum to ensure that kernel users
> of shutdown() don't get confused.

That looks pretty good - any objection to naming the enum and using that
name in the prototype for kernel_sock_shutdown() so it's even more obvious
what type of shutdown argument this expects?
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com

^ permalink raw reply

* DaveM collecting netdev patches this week
From: Jeff Garzik @ 2007-11-11 13:52 UTC (permalink / raw)
  To: netdev; +Cc: Linux Kernel Mailing List, Andrew Morton, David Miller

I'm about to disappear (virtually) through Friday for vacation.

David Miller has agreed to collect net driver bug fix patches in my 
absence, with Stephen and Francois (and others, hopefully) helping out 
with patch review.

David -- note that my 2.6.25 was opened a little while ago.  If you feel 
motivated enough to collect non-bugfix patches, please make sure to 
apply them on top of netdev-2.6.git#upstream.  There is already quite a 
collection of stuff for 2.6.25 queued...

	Jeff



^ permalink raw reply

* Re : Oops preceded by WARNING: at net/ipv4/tcp_input.c:1571 tcp_remove_reno_sacks()
From: Chazarain Guillaume @ 2007-11-11 12:53 UTC (permalink / raw)
  To: Ilpo Järvinen, David Miller; +Cc: Netdev

Hi,

> I'm currently running bittorrent with all of this, I just saw this (for
 the first time ever),
> but otherwise it works fine:
> 
> WARNING: at net/ipv4/tcp_output.c:1807 tcp_simple_retransmit()
>  [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
>  [<c0105563>] show_trace+0x12/0x14
>  [<c0105668>] dump_stack+0x15/0x17
>  [<c02f6a79>] tcp_simple_retransmit+0xfa/0x185
>  [<c02fa072>] tcp_v4_err+0x35d/0x4cb
>  [<c0301f7d>] icmp_unreach+0x327/0x352
>  [<c030159d>] icmp_rcv+0xe0/0xf7
>  [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
>  [<c02e3178>] ip_local_deliver+0x72/0x7e
>  [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
>  [<c02e30e8>] ip_rcv+0x1e1/0x1ff
>  [<c02c755c>] netif_receive_skb+0x37d/0x401
>  [<c02c9372>] process_backlog+0x5b/0x96
>  [<c02c9037>] net_rx_action+0x87/0x152
>  [<c0121c9f>] __do_softirq+0x38/0x7a
>  [<c0105975>] do_softirq+0x41/0x92

I don't know if it's caused by the disabling of tcp_sack, but bittorrenting the whole night, I
have a lot more of tcp_verify_left_out() warnings in the logs:

WARNING: at net/ipv4/tcp_output.c:1807 tcp_simple_retransmit()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f6a79>] tcp_simple_retransmit+0xfa/0x185
 [<c02fa072>] tcp_v4_err+0x35d/0x4cb
 [<c0301f7d>] icmp_unreach+0x327/0x352
 [<c030159d>] icmp_rcv+0xe0/0xf7
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:2405 tcp_fastretrans_alert()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f05a3>] tcp_ack+0xd8c/0x17dd
 [<c02f36bd>] tcp_rcv_established+0xdb/0x5f2
 [<c02f8bc5>] tcp_v4_do_rcv+0x2b/0x310
 [<c02faa0b>] tcp_v4_rcv+0x82b/0x89d
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:2405 tcp_fastretrans_alert()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f05a3>] tcp_ack+0xd8c/0x17dd
 [<c02f3b03>] tcp_rcv_established+0x521/0x5f2
 [<c02f8bc5>] tcp_v4_do_rcv+0x2b/0x310
 [<c02faa0b>] tcp_v4_rcv+0x82b/0x89d
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:1672 tcp_enter_frto()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f2a60>] tcp_enter_frto+0x166/0x1db
 [<c02f7a06>] tcp_write_timer+0x3aa/0x5bc
 [<c01249b4>] run_timer_softirq+0x105/0x177
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:2941 tcp_process_frto()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f014b>] tcp_ack+0x934/0x17dd
 [<c02f3b03>] tcp_rcv_established+0x521/0x5f2
 [<c02f8bc5>] tcp_v4_do_rcv+0x2b/0x310
 [<c02faa0b>] tcp_v4_rcv+0x82b/0x89d
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:2405 tcp_fastretrans_alert()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f05a3>] tcp_ack+0xd8c/0x17dd
 [<c02f3b03>] tcp_rcv_established+0x521/0x5f2
 [<c02f8bc5>] tcp_v4_do_rcv+0x2b/0x310
 [<c02faa0b>] tcp_v4_rcv+0x82b/0x89d
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_input.c:2306 tcp_try_to_open()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f0a8c>] tcp_ack+0x1275/0x17dd
 [<c02f3b03>] tcp_rcv_established+0x521/0x5f2
 [<c02f8bc5>] tcp_v4_do_rcv+0x2b/0x310
 [<c02faa0b>] tcp_v4_rcv+0x82b/0x89d
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================
WARNING: at net/ipv4/tcp_output.c:1807 tcp_simple_retransmit()
 [<c0104cb3>] show_trace_log_lvl+0x1a/0x2f
 [<c0105563>] show_trace+0x12/0x14
 [<c0105668>] dump_stack+0x15/0x17
 [<c02f6a79>] tcp_simple_retransmit+0xfa/0x185
 [<c02fa072>] tcp_v4_err+0x35d/0x4cb
 [<c0301f7d>] icmp_unreach+0x327/0x352
 [<c030159d>] icmp_rcv+0xe0/0xf7
 [<c02e2d75>] ip_local_deliver_finish+0x124/0x1ba
 [<c02e3178>] ip_local_deliver+0x72/0x7e
 [<c02e2c31>] ip_rcv_finish+0x299/0x2b9
 [<c02e30e8>] ip_rcv+0x1e1/0x1ff
 [<c02c755c>] netif_receive_skb+0x37d/0x401
 [<c02c9372>] process_backlog+0x5b/0x96
 [<c02c9037>] net_rx_action+0x87/0x152
 [<c0121c9f>] __do_softirq+0x38/0x7a
 [<c0105975>] do_softirq+0x41/0x92
 =======================


Cheers.

-- 
Guillaume





      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

^ permalink raw reply

* Re: drivers/net/ax88796.c compile error on sh64
From: Paul Mundt @ 2007-11-11  9:36 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Jeff Garzik, netdev, linux-kernel, linuxsh-dev, Magnus Damm,
	linuxsh-shmedia-dev
In-Reply-To: <20071111090620.GK21669@stusta.de>

On Sun, Nov 11, 2007 at 10:06:21AM +0100, Adrian Bunk wrote:
> Commit 8687991a734a67f1638782c968f46fff0f94bb1f causes the following 
> compile error on sh64:
> 
> <--  snip  -->
> 
> ...
>   CC [M]  drivers/net/ax88796.o
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 'ax_get_8390_hdr':
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:187: error: implicit declaration of function 'readsw'
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:189: error: implicit declaration of function 'readsb'
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 'ax_block_output':
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:275: error: implicit declaration of function 'writesw'
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:277: error: implicit declaration of function 'writesb'
> make[3]: *** [drivers/net/ax88796.o] Error 1
> 
> <--  snip -->
> 
That's a pretty good argument for the PLAT_HAS_xxx stuff in the Kconfig
space. We could have a if (CONFIG_SUPERH && !CONFIG_SUPERH64) thing here,
but there's probably not much point. I'm planning on merging them in the
2.6.25 time period anyways, so adding a stop-gap solution to hide this
driver's visibility doesn't really seem like a worthwhile endeavour.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply

* drivers/net/ax88796.c compile error on sh64
From: Adrian Bunk @ 2007-11-11  9:06 UTC (permalink / raw)
  To: Magnus Damm, Jeff Garzik, lethal
  Cc: linux-kernel, linuxsh-shmedia-dev, netdev

Commit 8687991a734a67f1638782c968f46fff0f94bb1f causes the following 
compile error on sh64:

<--  snip  -->

...
  CC [M]  drivers/net/ax88796.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 'ax_get_8390_hdr':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:187: error: implicit declaration of function 'readsw'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:189: error: implicit declaration of function 'readsb'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c: In function 'ax_block_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:275: error: implicit declaration of function 'writesw'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ax88796.c:277: error: implicit declaration of function 'writesb'
make[3]: *** [drivers/net/ax88796.o] Error 1

<--  snip -->


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

^ permalink raw reply

* Re: [2.6 patch] net/ipv4/ipvs/: remove unused exports
From: Simon Horman @ 2007-11-11  7:09 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Rumen G. Bogdanovski, wensong, ja, netdev, linux-kernel,
	David S. Miller, LVS Development mailing list
In-Reply-To: <20071111064840.GJ21669@stusta.de>

On Sun, Nov 11, 2007 at 07:48:40AM +0100, Adrian Bunk wrote:
> This patch removes the following unused EXPORT_SYMBOL's:
> - ip_vs_try_bind_dest
> - ip_vs_find_dest
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>

Looks fine to me.

Should Dave Miller put this in his tree,
or do you want to handle it a different way?

Acked-by: Simon Horman <horms@verge.net.au>

> 
> ---
> 
>  net/ipv4/ipvs/ip_vs_conn.c |    1 -
>  net/ipv4/ipvs/ip_vs_ctl.c  |    1 -
>  2 files changed, 2 deletions(-)
> 
> ad9f400d4f66ea3423f97e609d6ef2572055c603 
> diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
> index b7eeae6..0a9f3c3 100644
> --- a/net/ipv4/ipvs/ip_vs_conn.c
> +++ b/net/ipv4/ipvs/ip_vs_conn.c
> @@ -441,7 +441,6 @@ struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp)
>  	} else
>  		return NULL;
>  }
> -EXPORT_SYMBOL(ip_vs_try_bind_dest);
>  
>  
>  /*
> diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
> index 3c4d22a..b64cf45 100644
> --- a/net/ipv4/ipvs/ip_vs_ctl.c
> +++ b/net/ipv4/ipvs/ip_vs_ctl.c
> @@ -604,7 +604,6 @@ struct ip_vs_dest *ip_vs_find_dest(__be32 daddr, __be16 dport,
>  	ip_vs_service_put(svc);
>  	return dest;
>  }
> -EXPORT_SYMBOL(ip_vs_find_dest);
>  
>  /*
>   *  Lookup dest by {svc,addr,port} in the destination trash.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


^ permalink raw reply

* [2.6 patch] net/ipv4/ipvs/: remove unused exports
From: Adrian Bunk @ 2007-11-11  6:48 UTC (permalink / raw)
  To: Rumen G. Bogdanovski, wensong, horms, ja; +Cc: netdev, linux-kernel

This patch removes the following unused EXPORT_SYMBOL's:
- ip_vs_try_bind_dest
- ip_vs_find_dest

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 net/ipv4/ipvs/ip_vs_conn.c |    1 -
 net/ipv4/ipvs/ip_vs_ctl.c  |    1 -
 2 files changed, 2 deletions(-)

ad9f400d4f66ea3423f97e609d6ef2572055c603 
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index b7eeae6..0a9f3c3 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -441,7 +441,6 @@ struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp)
 	} else
 		return NULL;
 }
-EXPORT_SYMBOL(ip_vs_try_bind_dest);
 
 
 /*
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 3c4d22a..b64cf45 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -604,7 +604,6 @@ struct ip_vs_dest *ip_vs_find_dest(__be32 daddr, __be16 dport,
 	ip_vs_service_put(svc);
 	return dest;
 }
-EXPORT_SYMBOL(ip_vs_find_dest);
 
 /*
  *  Lookup dest by {svc,addr,port} in the destination trash.


^ permalink raw reply related

* [2.6 patch] unexport sysctl_{r,w}mem_max
From: Adrian Bunk @ 2007-11-11  6:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

sysctl_{r,w}mem_max can now be unexported.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
d49d51e5f46615c30e0f96c5333733e0ab1c85e6 
diff --git a/net/core/sock.c b/net/core/sock.c
index 8fc2f84..c519b43 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2097,7 +2097,3 @@ EXPORT_SYMBOL(sock_wmalloc);
 EXPORT_SYMBOL(sock_i_uid);
 EXPORT_SYMBOL(sock_i_ino);
 EXPORT_SYMBOL(sysctl_optmem_max);
-#ifdef CONFIG_SYSCTL
-EXPORT_SYMBOL(sysctl_rmem_max);
-EXPORT_SYMBOL(sysctl_wmem_max);
-#endif


^ permalink raw reply related

* Re: [PATCH] [RESEND] small possible memory leak in FIB rules
From: David Miller @ 2007-11-11  6:12 UTC (permalink / raw)
  To: den; +Cc: devel, containers, netdev
In-Reply-To: <20071107133636.GA10719@iris.sw.ru>

From: "Denis V. Lunev" <den@openvz.org>
Date: Wed, 7 Nov 2007 16:36:36 +0300

> This patch fixes a small memory leak. Default fib rules can be deleted by
> the user if the rule does not carry FIB_RULE_PERMANENT flag, f.e. by
> 	ip rule flush
> 
> Such a rule will not be freed as the ref-counter has 2 on start and becomes
> clearly unreachable after removal.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

Applied, thanks Denis.

^ permalink raw reply

* Re: [PATCH] netns: init dev_base_lock only once
From: David Miller @ 2007-11-11  6:09 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev, devel, ebiederm
In-Reply-To: <20071107125133.GA6213@localhost.sw.ru>

From: Alexey Dobriyan <adobriyan@sw.ru>
Date: Wed, 7 Nov 2007 15:51:33 +0300

> * it already statically initialized
> * reinitializing live global spinlock every time netns is
>   setup is also wrong
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>

Good catch.

Applied, thanks Alexey.

^ permalink raw reply

* Re: [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded
From: David Miller @ 2007-11-11  6:08 UTC (permalink / raw)
  To: xemul; +Cc: netdev, devel
In-Reply-To: <4731C52D.7020902@openvz.org>

From: Pavel Emelyanov <xemul@openvz.org>
Date: Wed, 07 Nov 2007 17:01:17 +0300

> The unix_nr_socks value is limited with the 2 * get_max_files() value,
> as seen from the unix_create1(). However, the check and the actual
> increment are separated with the GFP_KERNEL allocation, so this limit
> can be exceeded under a memory pressure - task may go to sleep freeing
> the pages and some other task will be allowed to allocate a new sock
> and so on and so forth.
> 
> So make the increment before the check (similar thing is done in the
> sock_kmalloc) and go to kmalloc after this.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, good catch Pavel.

^ permalink raw reply

* Re: [PATCH 2/3][UNIX] Convert socks to unix_socks in scan_inflight, not in callbacks
From: David Miller @ 2007-11-11  6:07 UTC (permalink / raw)
  To: xemul; +Cc: netdev, devel
In-Reply-To: <4731C405.6010203@openvz.org>

From: Pavel Emelyanov <xemul@openvz.org>
Date: Wed, 07 Nov 2007 16:56:21 +0300

> The scan_inflight() routine scans through the unix sockets and calls
> some passed callback. The fact is that all these callbacks work with
> the unix_sock objects, not the sock ones, so make this conversion in
> the scan_inflight() before calling the callbacks.
> 
> This removes one unneeded variable from the inc_inflight_move_tail().
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks Pavel.

^ permalink raw reply

* Re: [PATCH 1/3][UNIX] Make unix_tot_inflight counter non-atomic
From: David Miller @ 2007-11-11  6:06 UTC (permalink / raw)
  To: xemul; +Cc: netdev, devel
In-Reply-To: <4731C324.3080301@openvz.org>

From: Pavel Emelyanov <xemul@openvz.org>
Date: Wed, 07 Nov 2007 16:52:36 +0300

> This counter is _always_ modified under the unix_gc_lock spinlock, 
> so its atomicity can be provided w/o additional efforts.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied.

^ permalink raw reply

* Re: [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
From: David Miller @ 2007-11-11  6:03 UTC (permalink / raw)
  To: peter.p.waskiewicz.jr; +Cc: netdev
In-Reply-To: <20071106152547.14672.10821.stgit@localhost.localdomain>

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Date: Tue, 06 Nov 2007 07:25:47 -0800

> The socket option for packet sockets to return the original ifindex instead
> of the bonded ifindex will not match multicast traffic.  Since this socket
> option is the most useful for layer 2 traffic and multicast traffic, make
> the option multicast-aware.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

Applied, thanks Peter.

^ permalink raw reply

* Re: Please pull 'fixes-davem' branch of wireless-2.6 (this time for real!)
From: David Miller @ 2007-11-11  6:02 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: jeff-o2qLIJkoznsdnm+yROfE0A, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20071108021119.GD11957-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>

From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Wed, 7 Nov 2007 21:11:19 -0500

> On Wed, Nov 07, 2007 at 04:32:00PM -0800, David Miller wrote:
> > From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
> > Date: Wed, 7 Nov 2007 13:51:54 -0500
> > 
> > > Hold-off on this one for now if -- clearly Johannes and I need to
> > > brush-up on our Kconfig skills... :-(
> > > 
> > > I'll post a new pull request soon.
> > 
> > Ok.
> 
> Dave,
> 
> These fixes are additive on top of the previous request archived here:
> 
> 	http://marc.info/?l=linux-wireless&m=119439453721827&w=2
> 
> I've been sending ssb patches to you, but I'm not sure if that is the
> right place to send them.  If you don't want them, can you suggest where
> else I should send them?
> 
> Anyway, let me know if there are any problems!
 ...
> The entire series (i.e. both from yesterday and today) is available
> here:
> 
> 	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/fixes-davem

I applied all of these as patches, thanks John!

^ permalink raw reply

* Re: [PATCH] [PKT_SCHED] CLS_U32: Use ffs() instead of C code on hash mask to get first set bit.
From: David Miller @ 2007-11-11  5:55 UTC (permalink / raw)
  To: hadi; +Cc: radu.rendec, netdev, jarkao2
In-Reply-To: <1194529531.5743.9.camel@localhost>

From: jamal <hadi@cyberus.ca>
Date: Thu, 08 Nov 2007 08:45:31 -0500

> On Thu, 2007-08-11 at 13:07 +0200, Radu Rendec wrote:
> > Computing the rank of the first set bit in the hash mask (for using later
> > in u32_hash_fold()) was done with plain C code. Using ffs() instead makes
> > the code more readable and improves performance (since ffs() is better
> > optimized in assembler).
> > 
> > Using the conditional operator on hash mask before applying ntohl() also
> > saves one ntohl() call if mask is 0.
> > 
> > Signed-off-by: Radu Rendec <radu.rendec@ines.ro>
> 
> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>

Applied, thanks everyone.

^ permalink raw reply


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