public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@osdl.org>, torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rxrpc update
Date: Fri, 16 Jan 2004 16:47:31 +0000	[thread overview]
Message-ID: <19477.1074271651@redhat.com> (raw)


Hi Andrew, Linus,

Here's a patch to fix some bugs in my RxRPC code, including the fix for the
transport initialisation failure recovery spotted by Pete Zaitcev.

It also inserts some extra spaces in a few places.

David

diff -uNr -x CVS -x '.*' -x '*~' /inst-kernels/linux-2.6.1-afs/net/rxrpc/call.c afs/net/rxrpc/call.c
--- /inst-kernels/linux-2.6.1-afs/net/rxrpc/call.c	2004-01-12 11:24:33.000000000 +0000
+++ afs/net/rxrpc/call.c	2003-09-03 11:04:52.000000000 +0100
@@ -699,7 +699,7 @@
 
 		timo = rxrpc_call_dfr_ack_timeout + jiffies;
 
-		_debug("START ACKR TIMER for cj=%lu", timo-call->cjif);
+		_debug("START ACKR TIMER for cj=%lu", timo - call->cjif);
 
 		spin_lock(&call->lock);
 		mod_timer(&call->ackr_dfr_timo, timo);
@@ -722,7 +722,8 @@
 
 		/* fill out the appropriate form */
 		ack.bufferSpace	= htons(RXRPC_CALL_ACK_WINDOW_SIZE);
-		ack.maxSkew	= htons(min(call->ackr_high_seq - seq,65535U));
+		ack.maxSkew	= htons(min(call->ackr_high_seq - seq,
+					    65535U));
 		ack.firstPacket	= htonl(call->ackr_win_bot);
 		ack.previousPacket = call->ackr_prev_seq;
 		ack.serial	= hdr->serial;
@@ -825,7 +826,7 @@
 
 	_leave("");
 
-} /* end rxrpc_call_do_timeout() */
+} /* end rxrpc_call_do_stuff() */
 
 /*****************************************************************************/
 /*
@@ -1061,7 +1062,7 @@
 		_debug("Call add packet %d to unreadyq", msg->seq);
 
 		/* insert in seq order */
-		list_for_each(_p,&call->app_unreadyq) {
+		list_for_each(_p, &call->app_unreadyq) {
 			pmsg = list_entry(_p, struct rxrpc_message, link);
 			if (pmsg->seq > msg->seq)
 				break;
@@ -2095,7 +2096,8 @@
 
 		if (msg->hdr.flags & RXRPC_LAST_PACKET) {
 			msg->hdr.flags &= ~RXRPC_MORE_PACKETS;
-			msg->hdr.flags |= RXRPC_REQUEST_ACK;
+			if (call->app_call_state != RXRPC_CSTATE_CLNT_SND_ARGS)
+				msg->hdr.flags |= RXRPC_REQUEST_ACK;
 		}
 		else {
 			msg->hdr.flags |= RXRPC_MORE_PACKETS;
diff -uNr -x CVS -x '.*' -x '*~' /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxiod.c afs/net/rxrpc/krxiod.c
--- /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxiod.c	2004-01-12 11:24:33.000000000 +0000
+++ afs/net/rxrpc/krxiod.c	2003-09-03 13:37:44.000000000 +0100
@@ -44,12 +44,6 @@
 
 	daemonize("krxiod");
 
-	/* only certain signals are of interest */
-	spin_lock_irq(&current->sighand->siglock);
-	siginitsetinv(&current->blocked, 0);
-	recalc_sigpending();
-	spin_unlock_irq(&current->sighand->siglock);
-
 	/* loop around waiting for work to do */
 	do {
 		/* wait for work or to be told to exit */
@@ -116,7 +110,7 @@
 
 			if (!list_empty(&rxrpc_krxiod_callq)) {
 				call = list_entry(rxrpc_krxiod_callq.next,
-						   struct rxrpc_call,
+						  struct rxrpc_call,
 						  rcv_krxiodq_lk);
 				list_del_init(&call->rcv_krxiodq_lk);
 				atomic_dec(&rxrpc_krxiod_qcount);
@@ -125,7 +119,7 @@
 				 * away */
 				if (atomic_read(&call->usage) > 0) {
 					_debug("@@@ KRXIOD"
-					       " Begin Attend Call %p",call);
+					       " Begin Attend Call %p", call);
 					rxrpc_get_call(call);
 				}
 				else {
diff -uNr -x CVS -x '.*' -x '*~' /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxsecd.c afs/net/rxrpc/krxsecd.c
--- /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxsecd.c	2004-01-12 11:24:33.000000000 +0000
+++ afs/net/rxrpc/krxsecd.c	2003-09-03 13:37:35.000000000 +0100
@@ -57,12 +57,6 @@
 
 	daemonize("krxsecd");
 
-	/* only certain signals are of interest */
-	spin_lock_irq(&current->sighand->siglock);
-	siginitsetinv(&current->blocked, 0);
-	recalc_sigpending();
-	spin_unlock_irq(&current->sighand->siglock);
-
 	/* loop around waiting for work to do */
 	do {
 		/* wait for work or to be told to exit */
diff -uNr -x CVS -x '.*' -x '*~' /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxtimod.c afs/net/rxrpc/krxtimod.c
--- /inst-kernels/linux-2.6.1-afs/net/rxrpc/krxtimod.c	2004-01-12 11:24:33.000000000 +0000
+++ afs/net/rxrpc/krxtimod.c	2003-09-03 13:37:58.000000000 +0100
@@ -74,12 +74,6 @@
 
 	complete(&krxtimod_alive);
 
-	/* only certain signals are of interest */
-	spin_lock_irq(&current->sighand->siglock);
-	siginitsetinv(&current->blocked, 0);
-	recalc_sigpending();
-	spin_unlock_irq(&current->sighand->siglock);
-
 	/* loop around looking for things to attend to */
  loop:
 	set_current_state(TASK_INTERRUPTIBLE);
diff -uNr -x CVS -x '.*' -x '*~' /inst-kernels/linux-2.6.1-afs/net/rxrpc/transport.c afs/net/rxrpc/transport.c
--- /inst-kernels/linux-2.6.1-afs/net/rxrpc/transport.c	2004-01-12 11:24:33.000000000 +0000
+++ afs/net/rxrpc/transport.c	2004-01-07 18:30:05.000000000 +0000
@@ -130,7 +130,19 @@
 	return 0;
 
  error:
-	rxrpc_put_transport(trans);
+	/* finish cleaning up the transport (not really needed here, but...) */
+	if (trans->socket)
+		trans->socket->ops->shutdown(trans->socket, 2);
+
+	/* close the socket */
+	if (trans->socket) {
+		trans->socket->sk->sk_user_data = NULL;
+		sock_release(trans->socket);
+		trans->socket = NULL;
+	}
+
+	kfree(trans);
+
 
 	_leave(" = %d", ret);
 	return ret;

                 reply	other threads:[~2004-01-16 16:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19477.1074271651@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox