diff options
Diffstat (limited to 'net/sctp/sm_sideeffect.c')
-rw-r--r-- | net/sctp/sm_sideeffect.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 1a6eef39ab2f..bd859154000e 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -22,9 +22,8 @@ | |||
22 | * See the GNU General Public License for more details. | 22 | * See the GNU General Public License for more details. |
23 | * | 23 | * |
24 | * You should have received a copy of the GNU General Public License | 24 | * You should have received a copy of the GNU General Public License |
25 | * along with GNU CC; see the file COPYING. If not, write to | 25 | * along with GNU CC; see the file COPYING. If not, see |
26 | * the Free Software Foundation, 59 Temple Place - Suite 330, | 26 | * <http://www.gnu.org/licenses/>. |
27 | * Boston, MA 02111-1307, USA. | ||
28 | * | 27 | * |
29 | * Please send any bug reports or fixes you make to the | 28 | * Please send any bug reports or fixes you make to the |
30 | * email address(es): | 29 | * email address(es): |
@@ -249,7 +248,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer) | |||
249 | 248 | ||
250 | /* Check whether a task is in the sock. */ | 249 | /* Check whether a task is in the sock. */ |
251 | 250 | ||
252 | sctp_bh_lock_sock(asoc->base.sk); | 251 | bh_lock_sock(asoc->base.sk); |
253 | if (sock_owned_by_user(asoc->base.sk)) { | 252 | if (sock_owned_by_user(asoc->base.sk)) { |
254 | pr_debug("%s: sock is busy\n", __func__); | 253 | pr_debug("%s: sock is busy\n", __func__); |
255 | 254 | ||
@@ -276,7 +275,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer) | |||
276 | asoc->base.sk->sk_err = -error; | 275 | asoc->base.sk->sk_err = -error; |
277 | 276 | ||
278 | out_unlock: | 277 | out_unlock: |
279 | sctp_bh_unlock_sock(asoc->base.sk); | 278 | bh_unlock_sock(asoc->base.sk); |
280 | sctp_transport_put(transport); | 279 | sctp_transport_put(transport); |
281 | } | 280 | } |
282 | 281 | ||
@@ -289,7 +288,7 @@ static void sctp_generate_timeout_event(struct sctp_association *asoc, | |||
289 | struct net *net = sock_net(asoc->base.sk); | 288 | struct net *net = sock_net(asoc->base.sk); |
290 | int error = 0; | 289 | int error = 0; |
291 | 290 | ||
292 | sctp_bh_lock_sock(asoc->base.sk); | 291 | bh_lock_sock(asoc->base.sk); |
293 | if (sock_owned_by_user(asoc->base.sk)) { | 292 | if (sock_owned_by_user(asoc->base.sk)) { |
294 | pr_debug("%s: sock is busy: timer %d\n", __func__, | 293 | pr_debug("%s: sock is busy: timer %d\n", __func__, |
295 | timeout_type); | 294 | timeout_type); |
@@ -316,7 +315,7 @@ static void sctp_generate_timeout_event(struct sctp_association *asoc, | |||
316 | asoc->base.sk->sk_err = -error; | 315 | asoc->base.sk->sk_err = -error; |
317 | 316 | ||
318 | out_unlock: | 317 | out_unlock: |
319 | sctp_bh_unlock_sock(asoc->base.sk); | 318 | bh_unlock_sock(asoc->base.sk); |
320 | sctp_association_put(asoc); | 319 | sctp_association_put(asoc); |
321 | } | 320 | } |
322 | 321 | ||
@@ -368,7 +367,7 @@ void sctp_generate_heartbeat_event(unsigned long data) | |||
368 | struct sctp_association *asoc = transport->asoc; | 367 | struct sctp_association *asoc = transport->asoc; |
369 | struct net *net = sock_net(asoc->base.sk); | 368 | struct net *net = sock_net(asoc->base.sk); |
370 | 369 | ||
371 | sctp_bh_lock_sock(asoc->base.sk); | 370 | bh_lock_sock(asoc->base.sk); |
372 | if (sock_owned_by_user(asoc->base.sk)) { | 371 | if (sock_owned_by_user(asoc->base.sk)) { |
373 | pr_debug("%s: sock is busy\n", __func__); | 372 | pr_debug("%s: sock is busy\n", __func__); |
374 | 373 | ||
@@ -393,7 +392,7 @@ void sctp_generate_heartbeat_event(unsigned long data) | |||
393 | asoc->base.sk->sk_err = -error; | 392 | asoc->base.sk->sk_err = -error; |
394 | 393 | ||
395 | out_unlock: | 394 | out_unlock: |
396 | sctp_bh_unlock_sock(asoc->base.sk); | 395 | bh_unlock_sock(asoc->base.sk); |
397 | sctp_transport_put(transport); | 396 | sctp_transport_put(transport); |
398 | } | 397 | } |
399 | 398 | ||
@@ -405,8 +404,8 @@ void sctp_generate_proto_unreach_event(unsigned long data) | |||
405 | struct sctp_transport *transport = (struct sctp_transport *) data; | 404 | struct sctp_transport *transport = (struct sctp_transport *) data; |
406 | struct sctp_association *asoc = transport->asoc; | 405 | struct sctp_association *asoc = transport->asoc; |
407 | struct net *net = sock_net(asoc->base.sk); | 406 | struct net *net = sock_net(asoc->base.sk); |
408 | 407 | ||
409 | sctp_bh_lock_sock(asoc->base.sk); | 408 | bh_lock_sock(asoc->base.sk); |
410 | if (sock_owned_by_user(asoc->base.sk)) { | 409 | if (sock_owned_by_user(asoc->base.sk)) { |
411 | pr_debug("%s: sock is busy\n", __func__); | 410 | pr_debug("%s: sock is busy\n", __func__); |
412 | 411 | ||
@@ -428,7 +427,7 @@ void sctp_generate_proto_unreach_event(unsigned long data) | |||
428 | asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); | 427 | asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); |
429 | 428 | ||
430 | out_unlock: | 429 | out_unlock: |
431 | sctp_bh_unlock_sock(asoc->base.sk); | 430 | bh_unlock_sock(asoc->base.sk); |
432 | sctp_association_put(asoc); | 431 | sctp_association_put(asoc); |
433 | } | 432 | } |
434 | 433 | ||
@@ -544,7 +543,7 @@ static void sctp_cmd_init_failed(sctp_cmd_seq_t *commands, | |||
544 | { | 543 | { |
545 | struct sctp_ulpevent *event; | 544 | struct sctp_ulpevent *event; |
546 | 545 | ||
547 | event = sctp_ulpevent_make_assoc_change(asoc,0, SCTP_CANT_STR_ASSOC, | 546 | event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_CANT_STR_ASSOC, |
548 | (__u16)error, 0, 0, NULL, | 547 | (__u16)error, 0, 0, NULL, |
549 | GFP_ATOMIC); | 548 | GFP_ATOMIC); |
550 | 549 | ||
@@ -1116,7 +1115,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, | |||
1116 | sctp_init_cmd_seq(&commands); | 1115 | sctp_init_cmd_seq(&commands); |
1117 | 1116 | ||
1118 | debug_pre_sfn(); | 1117 | debug_pre_sfn(); |
1119 | status = (*state_fn->fn)(net, ep, asoc, subtype, event_arg, &commands); | 1118 | status = state_fn->fn(net, ep, asoc, subtype, event_arg, &commands); |
1120 | debug_post_sfn(); | 1119 | debug_post_sfn(); |
1121 | 1120 | ||
1122 | error = sctp_side_effects(event_type, subtype, state, | 1121 | error = sctp_side_effects(event_type, subtype, state, |