caif: Fix for a race in socket transmit with flow control.
Kill faulty checks on flow-off leading to connection drop at race conditions. caif_socket checks for flow-on before transmitting and goes to sleep or return -EAGAIN upon flow stop. Remove faulty subsequent checks on flow-off leading to connection drop. Also fix memory leaks on some of the errors paths. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e8abbe0d02
commit
374458b3fe
@@ -41,8 +41,10 @@ static int cfdbgl_transmit(struct cflayer *layr, struct cfpkt *pkt)
|
||||
struct caif_payload_info *info;
|
||||
int ret;
|
||||
|
||||
if (!cfsrvl_ready(service, &ret))
|
||||
if (!cfsrvl_ready(service, &ret)) {
|
||||
cfpkt_destroy(pkt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Add info for MUX-layer to route the packet out */
|
||||
info = cfpkt_info(pkt);
|
||||
|
Reference in New Issue
Block a user