[PATCH] rxrpc update
From: David Howells
Date: Fri Jan 16 2004 - 11:48:48 EST
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(¤t->sighand->siglock);
- siginitsetinv(¤t->blocked, 0);
- recalc_sigpending();
- spin_unlock_irq(¤t->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(¤t->sighand->siglock);
- siginitsetinv(¤t->blocked, 0);
- recalc_sigpending();
- spin_unlock_irq(¤t->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(¤t->sighand->siglock);
- siginitsetinv(¤t->blocked, 0);
- recalc_sigpending();
- spin_unlock_irq(¤t->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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/