diff options
Diffstat (limited to 'drivers/isdn/mISDN/socket.c')
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 916569ca156d..508945d1b9c1 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -483,22 +483,24 @@ data_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) | |||
483 | goto done; | 483 | goto done; |
484 | } | 484 | } |
485 | 485 | ||
486 | read_lock_bh(&data_sockets.lock); | 486 | if (sk->sk_protocol < ISDN_P_B_START) { |
487 | sk_for_each(csk, node, &data_sockets.head) { | 487 | read_lock_bh(&data_sockets.lock); |
488 | if (sk == csk) | 488 | sk_for_each(csk, node, &data_sockets.head) { |
489 | continue; | 489 | if (sk == csk) |
490 | if (_pms(csk)->dev != _pms(sk)->dev) | 490 | continue; |
491 | continue; | 491 | if (_pms(csk)->dev != _pms(sk)->dev) |
492 | if (csk->sk_protocol >= ISDN_P_B_START) | 492 | continue; |
493 | continue; | 493 | if (csk->sk_protocol >= ISDN_P_B_START) |
494 | if (IS_ISDN_P_TE(csk->sk_protocol) | 494 | continue; |
495 | == IS_ISDN_P_TE(sk->sk_protocol)) | 495 | if (IS_ISDN_P_TE(csk->sk_protocol) |
496 | continue; | 496 | == IS_ISDN_P_TE(sk->sk_protocol)) |
497 | continue; | ||
498 | read_unlock_bh(&data_sockets.lock); | ||
499 | err = -EBUSY; | ||
500 | goto done; | ||
501 | } | ||
497 | read_unlock_bh(&data_sockets.lock); | 502 | read_unlock_bh(&data_sockets.lock); |
498 | err = -EBUSY; | ||
499 | goto done; | ||
500 | } | 503 | } |
501 | read_unlock_bh(&data_sockets.lock); | ||
502 | 504 | ||
503 | _pms(sk)->ch.send = mISDN_send; | 505 | _pms(sk)->ch.send = mISDN_send; |
504 | _pms(sk)->ch.ctrl = mISDN_ctrl; | 506 | _pms(sk)->ch.ctrl = mISDN_ctrl; |