mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 08:25:20 +07:00
crypto: chtls: dereference null variable
skb dereferenced before check in sendpage Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Atul Gupta <atul.gupta@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b7af47b330
commit
53bcfb68c4
@ -1230,9 +1230,8 @@ int chtls_sendpage(struct sock *sk, struct page *page,
|
||||
struct sk_buff *skb = skb_peek_tail(&csk->txq);
|
||||
int copy, i;
|
||||
|
||||
copy = mss - skb->len;
|
||||
if (!skb || (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_NO_APPEND) ||
|
||||
copy <= 0) {
|
||||
(copy = mss - skb->len) <= 0) {
|
||||
new_buf:
|
||||
if (!csk_mem_free(cdev, sk))
|
||||
goto wait_for_sndbuf;
|
||||
|
Loading…
Reference in New Issue
Block a user