]> git.baikalelectronics.ru Git - kernel.git/commitdiff
chtls: Avoid unnecessary freeing of oreq pointer
authorAyush Sawal <ayush.sawal@chelsio.com>
Wed, 6 Jan 2021 04:29:09 +0000 (09:59 +0530)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Jan 2021 01:06:02 +0000 (17:06 -0800)
In chtls_pass_accept_request(), removing the chtls_reqsk_free()
call to avoid oreq freeing twice. Here oreq is the pointer to
struct request_sock.

Fixes: d389a7c785e7 ("crypto : chtls - CPL handler definition")
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c

index 04a8bd5af3b9d4b278ea64db6ae886d6a52c7556..3022c802d09a5d413f10880921535e47f3b515c3 100644 (file)
@@ -1397,7 +1397,7 @@ static void chtls_pass_accept_request(struct sock *sk,
 
        newsk = chtls_recv_sock(sk, oreq, network_hdr, req, cdev);
        if (!newsk)
-               goto free_oreq;
+               goto reject;
 
        if (chtls_get_module(newsk))
                goto reject;
@@ -1413,8 +1413,6 @@ static void chtls_pass_accept_request(struct sock *sk,
        kfree_skb(skb);
        return;
 
-free_oreq:
-       chtls_reqsk_free(oreq);
 reject:
        mk_tid_release(reply_skb, 0, tid);
        cxgb4_ofld_send(cdev->lldi->ports[0], reply_skb);