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:

کامیت شده توسط
David S. Miller

والد
e8abbe0d02
کامیت
374458b3fe
@@ -86,12 +86,17 @@ static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt)
|
||||
struct caif_payload_info *info;
|
||||
struct cfsrvl *service = container_obj(layr);
|
||||
int ret;
|
||||
if (!cfsrvl_ready(service, &ret))
|
||||
|
||||
if (!cfsrvl_ready(service, &ret)) {
|
||||
cfpkt_destroy(pkt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* STE Modem cannot handle more than 1500 bytes datagrams */
|
||||
if (cfpkt_getlen(pkt) > DGM_MTU)
|
||||
if (cfpkt_getlen(pkt) > DGM_MTU) {
|
||||
cfpkt_destroy(pkt);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
cfpkt_add_head(pkt, &zero, 3);
|
||||
packet_type = 0x08; /* B9 set - UNCLASSIFIED */
|
||||
|
مرجع در شماره جدید
Block a user