Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 2021 13:35:36 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b22150dadd23 - stable/13 - oce: Fix handling of m_pullup() errors in oce_tso_setup()
Message-ID:  <202106021335.152DZaSR011990@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=b22150dadd231a84886b2a078dfbe02f9c6d87cc

commit b22150dadd231a84886b2a078dfbe02f9c6d87cc
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-05-26 13:49:49 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-02 13:33:16 +0000

    oce: Fix handling of m_pullup() errors in oce_tso_setup()
    
    m_pullup() frees the input mbuf chain upon a failure.  Set *mpp to NULL
    in this case to ensure that the caller does not free the chain again.
    
    PR:             255864
    Submitted by:   Lv Yunlong <lylgood@foxmail.com> (original version)
    MFC after:      1 week
    
    (cherry picked from commit 71776d67198fadd7d96937c9bdd22063636b132b)
---
 sys/dev/oce/oce_if.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c
index 7c9b71089081..271c35015a9f 100644
--- a/sys/dev/oce/oce_if.c
+++ b/sys/dev/oce/oce_if.c
@@ -1330,11 +1330,8 @@ oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp)
 	}
 
 	m = m_pullup(m, total_len);
-	if (!m)
-		return NULL;
 	*mpp = m;
 	return m;
-
 }
 #endif /* INET6 || INET */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106021335.152DZaSR011990>