Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2024 04:45:16 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 905d5420ee1e - stable/14 - krping: Stop checking for failures from malloc(M_WAITOK)
Message-ID:  <202409300445.48U4jGmX086565@gitrepo.freebsd.org>

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

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

commit 905d5420ee1eced55f99ab3ba5c340b685f2f896
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:21 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 04:44:17 +0000

    krping: Stop checking for failures from malloc(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
    
    (cherry picked from commit 66c35a6675ff987b52a2018871231658b1980a6c)
---
 sys/contrib/rdma/krping/krping_dev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/contrib/rdma/krping/krping_dev.c b/sys/contrib/rdma/krping/krping_dev.c
index eea3c772ea4f..59aa19672443 100644
--- a/sys/contrib/rdma/krping/krping_dev.c
+++ b/sys/contrib/rdma/krping/krping_dev.c
@@ -174,12 +174,7 @@ krping_write(struct cdev *dev, struct uio *uio, int ioflag)
 	char *cp;
 	krping_t *krpingmsg;
 
-	krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK|M_ZERO);
-	if (!krpingmsg) {
-		uprintf("Could not malloc mem!\n");
-		return ENOMEM;
-	}
-
+	krpingmsg = malloc(sizeof *krpingmsg, M_DEVBUF, M_WAITOK | M_ZERO);
 	cp = krpingmsg->msg;
 	while (uio->uio_resid) {
 		amt = MIN(uio->uio_resid, remain);



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