[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121130170007.GA25818@shrek.podlesie.net>
Date: Fri, 30 Nov 2012 18:00:07 +0100
From: Krzysztof Mazur <krzysiek@...lesie.net>
To: David Woodhouse <dwmw2@...radead.org>
Cc: "Chas Williams (CONTRACTOR)" <chas@....nrl.navy.mil>,
David Laight <David.Laight@...LAB.COM>, davem@...emloft.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
nathan@...verse.com.au
Subject: Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc
On Fri, Nov 30, 2012 at 04:23:46PM +0000, David Woodhouse wrote:
>
> +static void br2684_release_cb(struct atm_vcc *atmvcc)
> +{
> + struct br2684_vcc *brvcc = BR2684_VCC(atmvcc);
> +
> + /*
> + * A race with br2684_xmit_vcc() might cause a spurious wakeup just
> + * after that function *stops* the queue, and qspace might actually
> + * go negative before the queue stops again. We cope with that.
> + */
We cannot race with br2684_xmit_vcc() because both br2684_xmit_vcc()
and br2684_release_cb() are called with locked sk->sk_lock.slock.
> + if (atomic_read(&brvcc->qspace) > 0)
> + netif_wake_queue(brvcc->device);
> +
> + if (brvcc->old_release_cb)
> + brvcc->old_release_cb(atmvcc);
> +}
Except that comment, the patch looks good:
Acked-by: Krzysztof Mazur <krzysiek@...lesie.net>
Krzysiek
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists