call_object.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. /* RxRPC individual remote procedure call handling
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  12. #include <linux/slab.h>
  13. #include <linux/module.h>
  14. #include <linux/circ_buf.h>
  15. #include <linux/spinlock_types.h>
  16. #include <net/sock.h>
  17. #include <net/af_rxrpc.h>
  18. #include "ar-internal.h"
  19. const char *const rxrpc_call_states[NR__RXRPC_CALL_STATES] = {
  20. [RXRPC_CALL_UNINITIALISED] = "Uninit ",
  21. [RXRPC_CALL_CLIENT_AWAIT_CONN] = "ClWtConn",
  22. [RXRPC_CALL_CLIENT_SEND_REQUEST] = "ClSndReq",
  23. [RXRPC_CALL_CLIENT_AWAIT_REPLY] = "ClAwtRpl",
  24. [RXRPC_CALL_CLIENT_RECV_REPLY] = "ClRcvRpl",
  25. [RXRPC_CALL_SERVER_PREALLOC] = "SvPrealc",
  26. [RXRPC_CALL_SERVER_SECURING] = "SvSecure",
  27. [RXRPC_CALL_SERVER_ACCEPTING] = "SvAccept",
  28. [RXRPC_CALL_SERVER_RECV_REQUEST] = "SvRcvReq",
  29. [RXRPC_CALL_SERVER_ACK_REQUEST] = "SvAckReq",
  30. [RXRPC_CALL_SERVER_SEND_REPLY] = "SvSndRpl",
  31. [RXRPC_CALL_SERVER_AWAIT_ACK] = "SvAwtACK",
  32. [RXRPC_CALL_COMPLETE] = "Complete",
  33. };
  34. const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = {
  35. [RXRPC_CALL_SUCCEEDED] = "Complete",
  36. [RXRPC_CALL_REMOTELY_ABORTED] = "RmtAbort",
  37. [RXRPC_CALL_LOCALLY_ABORTED] = "LocAbort",
  38. [RXRPC_CALL_LOCAL_ERROR] = "LocError",
  39. [RXRPC_CALL_NETWORK_ERROR] = "NetError",
  40. };
  41. struct kmem_cache *rxrpc_call_jar;
  42. static void rxrpc_call_timer_expired(unsigned long _call)
  43. {
  44. struct rxrpc_call *call = (struct rxrpc_call *)_call;
  45. _enter("%d", call->debug_id);
  46. if (call->state < RXRPC_CALL_COMPLETE)
  47. rxrpc_set_timer(call, rxrpc_timer_expired, ktime_get_real());
  48. }
  49. /*
  50. * find an extant server call
  51. * - called in process context with IRQs enabled
  52. */
  53. struct rxrpc_call *rxrpc_find_call_by_user_ID(struct rxrpc_sock *rx,
  54. unsigned long user_call_ID)
  55. {
  56. struct rxrpc_call *call;
  57. struct rb_node *p;
  58. _enter("%p,%lx", rx, user_call_ID);
  59. read_lock(&rx->call_lock);
  60. p = rx->calls.rb_node;
  61. while (p) {
  62. call = rb_entry(p, struct rxrpc_call, sock_node);
  63. if (user_call_ID < call->user_call_ID)
  64. p = p->rb_left;
  65. else if (user_call_ID > call->user_call_ID)
  66. p = p->rb_right;
  67. else
  68. goto found_extant_call;
  69. }
  70. read_unlock(&rx->call_lock);
  71. _leave(" = NULL");
  72. return NULL;
  73. found_extant_call:
  74. rxrpc_get_call(call, rxrpc_call_got);
  75. read_unlock(&rx->call_lock);
  76. _leave(" = %p [%d]", call, atomic_read(&call->usage));
  77. return call;
  78. }
  79. /*
  80. * allocate a new call
  81. */
  82. struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp)
  83. {
  84. struct rxrpc_call *call;
  85. call = kmem_cache_zalloc(rxrpc_call_jar, gfp);
  86. if (!call)
  87. return NULL;
  88. call->rxtx_buffer = kcalloc(RXRPC_RXTX_BUFF_SIZE,
  89. sizeof(struct sk_buff *),
  90. gfp);
  91. if (!call->rxtx_buffer)
  92. goto nomem;
  93. call->rxtx_annotations = kcalloc(RXRPC_RXTX_BUFF_SIZE, sizeof(u8), gfp);
  94. if (!call->rxtx_annotations)
  95. goto nomem_2;
  96. mutex_init(&call->user_mutex);
  97. setup_timer(&call->timer, rxrpc_call_timer_expired,
  98. (unsigned long)call);
  99. INIT_WORK(&call->processor, &rxrpc_process_call);
  100. INIT_LIST_HEAD(&call->link);
  101. INIT_LIST_HEAD(&call->chan_wait_link);
  102. INIT_LIST_HEAD(&call->accept_link);
  103. INIT_LIST_HEAD(&call->recvmsg_link);
  104. INIT_LIST_HEAD(&call->sock_link);
  105. init_waitqueue_head(&call->waitq);
  106. spin_lock_init(&call->lock);
  107. rwlock_init(&call->state_lock);
  108. atomic_set(&call->usage, 1);
  109. call->debug_id = atomic_inc_return(&rxrpc_debug_id);
  110. call->tx_total_len = -1;
  111. memset(&call->sock_node, 0xed, sizeof(call->sock_node));
  112. /* Leave space in the ring to handle a maxed-out jumbo packet */
  113. call->rx_winsize = rxrpc_rx_window_size;
  114. call->tx_winsize = 16;
  115. call->rx_expect_next = 1;
  116. if (RXRPC_TX_SMSS > 2190)
  117. call->cong_cwnd = 2;
  118. else if (RXRPC_TX_SMSS > 1095)
  119. call->cong_cwnd = 3;
  120. else
  121. call->cong_cwnd = 4;
  122. call->cong_ssthresh = RXRPC_RXTX_BUFF_SIZE - 1;
  123. return call;
  124. nomem_2:
  125. kfree(call->rxtx_buffer);
  126. nomem:
  127. kmem_cache_free(rxrpc_call_jar, call);
  128. return NULL;
  129. }
  130. /*
  131. * Allocate a new client call.
  132. */
  133. static struct rxrpc_call *rxrpc_alloc_client_call(struct sockaddr_rxrpc *srx,
  134. gfp_t gfp)
  135. {
  136. struct rxrpc_call *call;
  137. ktime_t now;
  138. _enter("");
  139. call = rxrpc_alloc_call(gfp);
  140. if (!call)
  141. return ERR_PTR(-ENOMEM);
  142. call->state = RXRPC_CALL_CLIENT_AWAIT_CONN;
  143. call->service_id = srx->srx_service;
  144. call->tx_phase = true;
  145. now = ktime_get_real();
  146. call->acks_latest_ts = now;
  147. call->cong_tstamp = now;
  148. _leave(" = %p", call);
  149. return call;
  150. }
  151. /*
  152. * Initiate the call ack/resend/expiry timer.
  153. */
  154. static void rxrpc_start_call_timer(struct rxrpc_call *call)
  155. {
  156. ktime_t now = ktime_get_real(), expire_at;
  157. expire_at = ktime_add_ms(now, rxrpc_max_call_lifetime);
  158. call->expire_at = expire_at;
  159. call->ack_at = expire_at;
  160. call->ping_at = expire_at;
  161. call->resend_at = expire_at;
  162. call->timer.expires = jiffies + LONG_MAX / 2;
  163. rxrpc_set_timer(call, rxrpc_timer_begin, now);
  164. }
  165. /*
  166. * Set up a call for the given parameters.
  167. * - Called with the socket lock held, which it must release.
  168. * - If it returns a call, the call's lock will need releasing by the caller.
  169. */
  170. struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *rx,
  171. struct rxrpc_conn_parameters *cp,
  172. struct sockaddr_rxrpc *srx,
  173. unsigned long user_call_ID,
  174. s64 tx_total_len,
  175. gfp_t gfp)
  176. __releases(&rx->sk.sk_lock.slock)
  177. {
  178. struct rxrpc_call *call, *xcall;
  179. struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk));
  180. struct rb_node *parent, **pp;
  181. const void *here = __builtin_return_address(0);
  182. int ret;
  183. _enter("%p,%lx", rx, user_call_ID);
  184. call = rxrpc_alloc_client_call(srx, gfp);
  185. if (IS_ERR(call)) {
  186. release_sock(&rx->sk);
  187. _leave(" = %ld", PTR_ERR(call));
  188. return call;
  189. }
  190. call->tx_total_len = tx_total_len;
  191. trace_rxrpc_call(call, rxrpc_call_new_client, atomic_read(&call->usage),
  192. here, (const void *)user_call_ID);
  193. /* We need to protect a partially set up call against the user as we
  194. * will be acting outside the socket lock.
  195. */
  196. mutex_lock(&call->user_mutex);
  197. /* Publish the call, even though it is incompletely set up as yet */
  198. write_lock(&rx->call_lock);
  199. pp = &rx->calls.rb_node;
  200. parent = NULL;
  201. while (*pp) {
  202. parent = *pp;
  203. xcall = rb_entry(parent, struct rxrpc_call, sock_node);
  204. if (user_call_ID < xcall->user_call_ID)
  205. pp = &(*pp)->rb_left;
  206. else if (user_call_ID > xcall->user_call_ID)
  207. pp = &(*pp)->rb_right;
  208. else
  209. goto error_dup_user_ID;
  210. }
  211. rcu_assign_pointer(call->socket, rx);
  212. call->user_call_ID = user_call_ID;
  213. __set_bit(RXRPC_CALL_HAS_USERID, &call->flags);
  214. rxrpc_get_call(call, rxrpc_call_got_userid);
  215. rb_link_node(&call->sock_node, parent, pp);
  216. rb_insert_color(&call->sock_node, &rx->calls);
  217. list_add(&call->sock_link, &rx->sock_calls);
  218. write_unlock(&rx->call_lock);
  219. write_lock(&rxnet->call_lock);
  220. list_add_tail(&call->link, &rxnet->calls);
  221. write_unlock(&rxnet->call_lock);
  222. /* From this point on, the call is protected by its own lock. */
  223. release_sock(&rx->sk);
  224. /* Set up or get a connection record and set the protocol parameters,
  225. * including channel number and call ID.
  226. */
  227. ret = rxrpc_connect_call(call, cp, srx, gfp);
  228. if (ret < 0)
  229. goto error;
  230. trace_rxrpc_call(call, rxrpc_call_connected, atomic_read(&call->usage),
  231. here, NULL);
  232. spin_lock_bh(&call->conn->params.peer->lock);
  233. hlist_add_head(&call->error_link,
  234. &call->conn->params.peer->error_targets);
  235. spin_unlock_bh(&call->conn->params.peer->lock);
  236. rxrpc_start_call_timer(call);
  237. _net("CALL new %d on CONN %d", call->debug_id, call->conn->debug_id);
  238. _leave(" = %p [new]", call);
  239. return call;
  240. /* We unexpectedly found the user ID in the list after taking
  241. * the call_lock. This shouldn't happen unless the user races
  242. * with itself and tries to add the same user ID twice at the
  243. * same time in different threads.
  244. */
  245. error_dup_user_ID:
  246. write_unlock(&rx->call_lock);
  247. release_sock(&rx->sk);
  248. ret = -EEXIST;
  249. error:
  250. __rxrpc_set_call_completion(call, RXRPC_CALL_LOCAL_ERROR,
  251. RX_CALL_DEAD, ret);
  252. trace_rxrpc_call(call, rxrpc_call_error, atomic_read(&call->usage),
  253. here, ERR_PTR(ret));
  254. rxrpc_release_call(rx, call);
  255. mutex_unlock(&call->user_mutex);
  256. rxrpc_put_call(call, rxrpc_call_put);
  257. _leave(" = %d", ret);
  258. return ERR_PTR(ret);
  259. }
  260. /*
  261. * Set up an incoming call. call->conn points to the connection.
  262. * This is called in BH context and isn't allowed to fail.
  263. */
  264. void rxrpc_incoming_call(struct rxrpc_sock *rx,
  265. struct rxrpc_call *call,
  266. struct sk_buff *skb)
  267. {
  268. struct rxrpc_connection *conn = call->conn;
  269. struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
  270. u32 chan;
  271. _enter(",%d", call->conn->debug_id);
  272. rcu_assign_pointer(call->socket, rx);
  273. call->call_id = sp->hdr.callNumber;
  274. call->service_id = sp->hdr.serviceId;
  275. call->cid = sp->hdr.cid;
  276. call->state = RXRPC_CALL_SERVER_ACCEPTING;
  277. if (sp->hdr.securityIndex > 0)
  278. call->state = RXRPC_CALL_SERVER_SECURING;
  279. call->cong_tstamp = skb->tstamp;
  280. /* Set the channel for this call. We don't get channel_lock as we're
  281. * only defending against the data_ready handler (which we're called
  282. * from) and the RESPONSE packet parser (which is only really
  283. * interested in call_counter and can cope with a disagreement with the
  284. * call pointer).
  285. */
  286. chan = sp->hdr.cid & RXRPC_CHANNELMASK;
  287. conn->channels[chan].call_counter = call->call_id;
  288. conn->channels[chan].call_id = call->call_id;
  289. rcu_assign_pointer(conn->channels[chan].call, call);
  290. spin_lock(&conn->params.peer->lock);
  291. hlist_add_head(&call->error_link, &conn->params.peer->error_targets);
  292. spin_unlock(&conn->params.peer->lock);
  293. _net("CALL incoming %d on CONN %d", call->debug_id, call->conn->debug_id);
  294. rxrpc_start_call_timer(call);
  295. _leave("");
  296. }
  297. /*
  298. * Queue a call's work processor, getting a ref to pass to the work queue.
  299. */
  300. bool rxrpc_queue_call(struct rxrpc_call *call)
  301. {
  302. const void *here = __builtin_return_address(0);
  303. int n = __atomic_add_unless(&call->usage, 1, 0);
  304. if (n == 0)
  305. return false;
  306. if (rxrpc_queue_work(&call->processor))
  307. trace_rxrpc_call(call, rxrpc_call_queued, n + 1, here, NULL);
  308. else
  309. rxrpc_put_call(call, rxrpc_call_put_noqueue);
  310. return true;
  311. }
  312. /*
  313. * Queue a call's work processor, passing the callers ref to the work queue.
  314. */
  315. bool __rxrpc_queue_call(struct rxrpc_call *call)
  316. {
  317. const void *here = __builtin_return_address(0);
  318. int n = atomic_read(&call->usage);
  319. ASSERTCMP(n, >=, 1);
  320. if (rxrpc_queue_work(&call->processor))
  321. trace_rxrpc_call(call, rxrpc_call_queued_ref, n, here, NULL);
  322. else
  323. rxrpc_put_call(call, rxrpc_call_put_noqueue);
  324. return true;
  325. }
  326. /*
  327. * Note the re-emergence of a call.
  328. */
  329. void rxrpc_see_call(struct rxrpc_call *call)
  330. {
  331. const void *here = __builtin_return_address(0);
  332. if (call) {
  333. int n = atomic_read(&call->usage);
  334. trace_rxrpc_call(call, rxrpc_call_seen, n, here, NULL);
  335. }
  336. }
  337. /*
  338. * Note the addition of a ref on a call.
  339. */
  340. void rxrpc_get_call(struct rxrpc_call *call, enum rxrpc_call_trace op)
  341. {
  342. const void *here = __builtin_return_address(0);
  343. int n = atomic_inc_return(&call->usage);
  344. trace_rxrpc_call(call, op, n, here, NULL);
  345. }
  346. /*
  347. * Detach a call from its owning socket.
  348. */
  349. void rxrpc_release_call(struct rxrpc_sock *rx, struct rxrpc_call *call)
  350. {
  351. const void *here = __builtin_return_address(0);
  352. struct rxrpc_connection *conn = call->conn;
  353. bool put = false;
  354. int i;
  355. _enter("{%d,%d}", call->debug_id, atomic_read(&call->usage));
  356. trace_rxrpc_call(call, rxrpc_call_release, atomic_read(&call->usage),
  357. here, (const void *)call->flags);
  358. ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE);
  359. spin_lock_bh(&call->lock);
  360. if (test_and_set_bit(RXRPC_CALL_RELEASED, &call->flags))
  361. BUG();
  362. spin_unlock_bh(&call->lock);
  363. del_timer_sync(&call->timer);
  364. /* Make sure we don't get any more notifications */
  365. write_lock_bh(&rx->recvmsg_lock);
  366. if (!list_empty(&call->recvmsg_link)) {
  367. _debug("unlinking once-pending call %p { e=%lx f=%lx }",
  368. call, call->events, call->flags);
  369. list_del(&call->recvmsg_link);
  370. put = true;
  371. }
  372. /* list_empty() must return false in rxrpc_notify_socket() */
  373. call->recvmsg_link.next = NULL;
  374. call->recvmsg_link.prev = NULL;
  375. write_unlock_bh(&rx->recvmsg_lock);
  376. if (put)
  377. rxrpc_put_call(call, rxrpc_call_put);
  378. write_lock(&rx->call_lock);
  379. if (test_and_clear_bit(RXRPC_CALL_HAS_USERID, &call->flags)) {
  380. rb_erase(&call->sock_node, &rx->calls);
  381. memset(&call->sock_node, 0xdd, sizeof(call->sock_node));
  382. rxrpc_put_call(call, rxrpc_call_put_userid);
  383. }
  384. list_del(&call->sock_link);
  385. write_unlock(&rx->call_lock);
  386. _debug("RELEASE CALL %p (%d CONN %p)", call, call->debug_id, conn);
  387. if (conn)
  388. rxrpc_disconnect_call(call);
  389. for (i = 0; i < RXRPC_RXTX_BUFF_SIZE; i++) {
  390. rxrpc_free_skb(call->rxtx_buffer[i],
  391. (call->tx_phase ? rxrpc_skb_tx_cleaned :
  392. rxrpc_skb_rx_cleaned));
  393. call->rxtx_buffer[i] = NULL;
  394. }
  395. _leave("");
  396. }
  397. /*
  398. * release all the calls associated with a socket
  399. */
  400. void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx)
  401. {
  402. struct rxrpc_call *call;
  403. _enter("%p", rx);
  404. while (!list_empty(&rx->to_be_accepted)) {
  405. call = list_entry(rx->to_be_accepted.next,
  406. struct rxrpc_call, accept_link);
  407. list_del(&call->accept_link);
  408. rxrpc_abort_call("SKR", call, 0, RX_CALL_DEAD, -ECONNRESET);
  409. rxrpc_put_call(call, rxrpc_call_put);
  410. }
  411. while (!list_empty(&rx->sock_calls)) {
  412. call = list_entry(rx->sock_calls.next,
  413. struct rxrpc_call, sock_link);
  414. rxrpc_get_call(call, rxrpc_call_got);
  415. rxrpc_abort_call("SKT", call, 0, RX_CALL_DEAD, -ECONNRESET);
  416. rxrpc_send_abort_packet(call);
  417. rxrpc_release_call(rx, call);
  418. rxrpc_put_call(call, rxrpc_call_put);
  419. }
  420. _leave("");
  421. }
  422. /*
  423. * release a call
  424. */
  425. void rxrpc_put_call(struct rxrpc_call *call, enum rxrpc_call_trace op)
  426. {
  427. struct rxrpc_net *rxnet;
  428. const void *here = __builtin_return_address(0);
  429. int n;
  430. ASSERT(call != NULL);
  431. n = atomic_dec_return(&call->usage);
  432. trace_rxrpc_call(call, op, n, here, NULL);
  433. ASSERTCMP(n, >=, 0);
  434. if (n == 0) {
  435. _debug("call %d dead", call->debug_id);
  436. ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE);
  437. if (!list_empty(&call->link)) {
  438. rxnet = rxrpc_net(sock_net(&call->socket->sk));
  439. write_lock(&rxnet->call_lock);
  440. list_del_init(&call->link);
  441. write_unlock(&rxnet->call_lock);
  442. }
  443. rxrpc_cleanup_call(call);
  444. }
  445. }
  446. /*
  447. * Final call destruction under RCU.
  448. */
  449. static void rxrpc_rcu_destroy_call(struct rcu_head *rcu)
  450. {
  451. struct rxrpc_call *call = container_of(rcu, struct rxrpc_call, rcu);
  452. rxrpc_put_peer(call->peer);
  453. kfree(call->rxtx_buffer);
  454. kfree(call->rxtx_annotations);
  455. kmem_cache_free(rxrpc_call_jar, call);
  456. }
  457. /*
  458. * clean up a call
  459. */
  460. void rxrpc_cleanup_call(struct rxrpc_call *call)
  461. {
  462. int i;
  463. _net("DESTROY CALL %d", call->debug_id);
  464. memset(&call->sock_node, 0xcd, sizeof(call->sock_node));
  465. del_timer_sync(&call->timer);
  466. ASSERTCMP(call->state, ==, RXRPC_CALL_COMPLETE);
  467. ASSERT(test_bit(RXRPC_CALL_RELEASED, &call->flags));
  468. ASSERTCMP(call->conn, ==, NULL);
  469. /* Clean up the Rx/Tx buffer */
  470. for (i = 0; i < RXRPC_RXTX_BUFF_SIZE; i++)
  471. rxrpc_free_skb(call->rxtx_buffer[i],
  472. (call->tx_phase ? rxrpc_skb_tx_cleaned :
  473. rxrpc_skb_rx_cleaned));
  474. rxrpc_free_skb(call->tx_pending, rxrpc_skb_tx_cleaned);
  475. call_rcu(&call->rcu, rxrpc_rcu_destroy_call);
  476. }
  477. /*
  478. * Make sure that all calls are gone from a network namespace. To reach this
  479. * point, any open UDP sockets in that namespace must have been closed, so any
  480. * outstanding calls cannot be doing I/O.
  481. */
  482. void rxrpc_destroy_all_calls(struct rxrpc_net *rxnet)
  483. {
  484. struct rxrpc_call *call;
  485. _enter("");
  486. if (list_empty(&rxnet->calls))
  487. return;
  488. write_lock(&rxnet->call_lock);
  489. while (!list_empty(&rxnet->calls)) {
  490. call = list_entry(rxnet->calls.next, struct rxrpc_call, link);
  491. _debug("Zapping call %p", call);
  492. rxrpc_see_call(call);
  493. list_del_init(&call->link);
  494. pr_err("Call %p still in use (%d,%s,%lx,%lx)!\n",
  495. call, atomic_read(&call->usage),
  496. rxrpc_call_states[call->state],
  497. call->flags, call->events);
  498. write_unlock(&rxnet->call_lock);
  499. cond_resched();
  500. write_lock(&rxnet->call_lock);
  501. }
  502. write_unlock(&rxnet->call_lock);
  503. }