From nobody Mon Sep 30 04:45:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7md6dV2z5Xk2w; Mon, 30 Sep 2024 04:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7md5NVSz4FNt; Mon, 30 Sep 2024 04:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MH+NDtS1SGDZOMPa6efGiXXI8+qFSuKsxSgSOLKPxwM=; b=kHbEWvrH8FZ0iyHEvjrbUzgjHGPiWyq4ohxhlKq+1i69KB/vNTf0AIJwYfPK/T1syQKGDO UH4RMNPLKHct0ffIDJ2gVqyHU7HunjupTpCYnF9D9ZoCWuEAywxaNGD8/eOIc7kfedaWWH dG8DkBScepXSeBVQQnzn0S47wARYdfesZNcf+subQgElVI2Pp4CXE9X2E/dWiQeFeP9nfV dIio+h8RdIgQDmGBuObrg4CiVvU9orcK0U2rlkE+P0UF1t6+9vz5NFesad8wrqWeZ5/QkO AuKpKLrtO/16G1hNHbktTyZC0K14TLPNhco8vDAHR6zmm83e/MV8pch1ElQysw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MH+NDtS1SGDZOMPa6efGiXXI8+qFSuKsxSgSOLKPxwM=; b=UanlTVRVvX6yqf7fRrmLV2yvB50W/JJHXLF+BB26fR5CTAOy0SLbL5whYAkgxWTExAc1Hs xdUW6hW+Yf6FjMIseObbMf5lrPbNev9kjb/DiROUR1YOEcAex/BcmEqkoOPAOan82vjSPB prTSRFt+Jt/4f2USJ2pUOCgiMyHJ3duJh4XKlJLqpxR8RS5/oTK+X328YesedU+cC+eNfN AQ705woTor3q4+/60iKp+DgP4vkGubHhDEck+SYZ+EkBDUvZ+7DhhWO70/OkQk/5j2RE2M OzfwE8htQnnvAui1SihAqS2M9nG7U3ewAgLVFL6h0Cv2JQbd9E9XadnLjxoEgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671537; a=rsa-sha256; cv=none; b=cvA0b13yVrsnWTCitMuN1W+0y7pcBe1F8CdaG7gZDN25Vh2JalUhTLl3cJHo2CyNxjXrBf 0wN002mCo6A1pol10ez0sCXKVJykK3/PagUS82agyRl40M1N516DnvJxJLDNArmG4FjaQS uGjha+/it7AxeL6vX2Tf5Aj2ASw8xnGl5ToNnlmzSt866K1DvmLnVf54Aa3fw/Koj2Sy+5 i04eLpj2eeCc+mPlv38dh+cVEr/lK2Ja++Xvt0dOlwVXZBDkqrQK3wodpDsmEdj66ftj5U ZRSBPX+tKWNZY38V20CSES7yHtH2lCUekKOPRIA1dTOWwUGxhvf4zOmHqFiU2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7md4B9GzdwP; Mon, 30 Sep 2024 04:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48U4jbgm087487; Mon, 30 Sep 2024 04:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jbku087484; Mon, 30 Sep 2024 04:45:37 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:37 GMT Message-Id: <202409300445.48U4jbku087484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c860df902b6d - stable/14 - hptnr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c860df902b6d010cb18490580c776c4b0a6a9123 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c860df902b6d010cb18490580c776c4b0a6a9123 commit c860df902b6d010cb18490580c776c4b0a6a9123 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:23 +0000 hptnr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit a3ec5d3ee7579a26790a86ca4c074512946ab964) --- sys/dev/hptnr/hptnr_osm_bsd.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/hptnr/hptnr_osm_bsd.c b/sys/dev/hptnr/hptnr_osm_bsd.c index 00774bf9be4a..b1fcaae2fd7a 100644 --- a/sys/dev/hptnr/hptnr_osm_bsd.c +++ b/sys/dev/hptnr/hptnr_osm_bsd.c @@ -165,7 +165,6 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_ext) f->tag, f->count, f->size, f->count*f->size)); for (i=0; icount; i++) { p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); - if (!p) return (ENXIO); *p = f->head; f->head = p; } @@ -1389,10 +1388,6 @@ static void hpt_final_init(void *dummy) for (i=0; ivbus_ext = vbus_ext; ext->next = vbus_ext->cmdext_list; vbus_ext->cmdext_list = ext; @@ -1610,19 +1605,14 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, stru if (ioctl_args.nInBufferSize) { ioctl_args.lpInBuffer = malloc(ioctl_args.nInBufferSize, M_DEVBUF, M_WAITOK); - if (!ioctl_args.lpInBuffer) - goto invalid; if (copyin((void*)piop->lpInBuffer, ioctl_args.lpInBuffer, piop->nInBufferSize)) goto invalid; } - if (ioctl_args.nOutBufferSize) { + if (ioctl_args.nOutBufferSize) ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); - if (!ioctl_args.lpOutBuffer) - goto invalid; - } - + hpt_do_ioctl(&ioctl_args); if (ioctl_args.result==HPT_IOCTL_RESULT_OK) {