Re: [RFC 1/4] Bluetooth: clean up sco code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On Fri, Nov 26, 2010 at 11:22 AM, Emeltchenko Andrei
<Andrei.Emeltchenko.news@xxxxxxxxx> wrote:
> @@ -828,13 +831,14 @@ static void sco_chan_del(struct sock *sk, int err)
>
>  static void sco_conn_ready(struct sco_conn *conn)
>  {
> -       struct sock *parent, *sk;
> +       struct sock *parent;
> +       struct sock *sk = conn->sk;

I wonder if there is a problem with accessing conn->sk here outside
the lock protection?

>
>        BT_DBG("conn %p", conn);
>
>        sco_conn_lock(conn);
>
> -       if ((sk = conn->sk)) {
> +       if (sk) {
>                sco_sock_clear_timer(sk);
>                bh_lock_sock(sk);
>                sk->sk_state = BT_CONNECTED;

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux