RxRPC fixes
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAUufhfBOxKuMESys7AQL1bQ/9GswO6rzisJPxnOdC9TXUtO2LXJFzaUjB soyYlyd/3/Syx5/EnUxwrBaAoL8CJIVJzO7B2RaWXjnrrQM7pvP32A8mN4GuLKPb tTm7/yQi8vTP97lhEvVBYFFEjr0pJAOzDAhtc/7N3b9i+zJ2Rh1kG3ihItlYEqx3 zBvscaRF7rqozny9bZUVk6DH0q9nLywd8RbSPW4PhCBTeZUqwYIe6Pu6uMWQEPAX sNwA5F6ukiAB6/Cz4v4RQtqZrFpZUM+pQhf/hi10k92g4qmTWhPj9XtfsI2glUUx brX3pcfaiOtxQidtEwVA8Daicry6gWxt4NDmxzDKmn/8FliaRIWwUBhEn8FXEXhI Y63RzQf48KBd4t6Ux/JEI+/oe+RiPe5rYrgoxW1Y1y4QsB015zTYKI2nvwujycfn 6qxMuu5G7gXq7DFXYyQjS1paQsUQZUmU18i8oVgeNHS60jxwKKSkB/21Pt/xC+aT ztxvL0IxfXQS1C5bK67URZgj5xFj/SMKMVic9PNkmnGZJ/CzSUPOiPRF7qAhe/q5 dH3ZLJmkAFQZYKfezvOCrsqABMXG9Ndvr3UVq0kEQrshEOe8LqVH+d8gkWnbzLL6 cc+Dat4Tf1hm79z79xA3SvTTs8xNp8ypSQk21G+8b5ecUicV4BKpJl0ieU3WhFSm HY7xX9Ihaec= =igX7 -----END PGP SIGNATURE----- Merge tag 'rxrpc-20140126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== RxRPC fixes Here are some small AF_RXRPC fixes. (1) Fix a place where a spinlock is taken conditionally but is released unconditionally. (2) Fix a double-free that happens when cleaning up on a checksum error. (3) Fix handling of CHECKSUM_PARTIAL whilst delivering messages to userspace. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
cd0c75a78d
|
@ -381,6 +381,8 @@ static int rxrpc_connect_exclusive(struct rxrpc_sock *rx,
|
|||
|
||||
rxrpc_assign_connection_id(conn);
|
||||
rx->conn = conn;
|
||||
} else {
|
||||
spin_lock(&trans->client_lock);
|
||||
}
|
||||
|
||||
/* we've got a connection with a free channel and we can now attach the
|
||||
|
|
|
@ -180,7 +180,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
|
|||
if (copy > len - copied)
|
||||
copy = len - copied;
|
||||
|
||||
if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
|
||||
if (skb->ip_summed == CHECKSUM_UNNECESSARY ||
|
||||
skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
ret = skb_copy_datagram_iovec(skb, offset,
|
||||
msg->msg_iov, copy);
|
||||
} else {
|
||||
|
@ -353,6 +354,10 @@ csum_copy_error:
|
|||
if (continue_call)
|
||||
rxrpc_put_call(continue_call);
|
||||
rxrpc_kill_skb(skb);
|
||||
if (!(flags & MSG_PEEK)) {
|
||||
if (skb_dequeue(&rx->sk.sk_receive_queue) != skb)
|
||||
BUG();
|
||||
}
|
||||
skb_kill_datagram(&rx->sk, skb, flags);
|
||||
rxrpc_put_call(call);
|
||||
return -EAGAIN;
|
||||
|
|
Загрузка…
Ссылка в новой задаче