pppoatm: drop frames to not-ready vcc
authorKrzysztof Mazur <krzysiek@podlesie.net>
Sat, 10 Nov 2012 22:33:19 +0000 (23:33 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Nov 2012 12:21:42 +0000 (12:21 +0000)
commit071d93931a75dc1f82f0baa9959613af81c5a032
treea6a4a61cacc37fe189aa7676871c654f37ef244f
parent3ac108006fd7f20cb8fc8ea2287f1497bcda00a1
pppoatm: drop frames to not-ready vcc

The vcc_destroy_socket() closes vcc before the protocol is detached
from vcc by calling vcc->push() with NULL skb. This leaves some time
window, where the protocol may call vcc->send() on closed vcc
and crash.

Now pppoatm_send(), like vcc_sendmsg(), checks for vcc flags that
indicate that vcc is not ready. If the vcc is not ready we just
drop frame. Queueing frames is much more complicated because we
don't have callbacks that inform us about vcc flags changes.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
net/atm/pppoatm.c