From nobody Tue Sep 03 10:27:17 2024 X-Original-To: dev-commits-src-main@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 4WyhdL1BBFz5MkPQ; Tue, 03 Sep 2024 10:27:18 +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 4WyhdK51wsz4sqx; Tue, 3 Sep 2024 10:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359237; 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=nwJjeN5OpHYSN/OVy9CNTIJChYEraCGfmdtDpqG+l1g=; b=lJJQCxQA3S4HKuFssa7M0WFI8uJR2DsoAb+qTcyldaVsF3OsfxnpPl0/SYLdvGw2BHALsR HS8AbsP7ETrkyPSb4m/7bjwsTADwH1R4J01N3UQxbZhlEXHEJW6qiexDvFiBoq0Bn7xDbn Yz36S5yhHGXDa9y1tmiTmzJgfUeKmjpYJiW127XisICcxx/WX9T4810ttYtmWqheUJDz6W rYGfLffaNgmwkiEF6HaD5mjkg7oc/AEXh/UHEKTAS9f97HS43x+Q3zdP3P3rruanSUOtdx RoN0TFb4x3XFMz6exvhFlXdLkD3CWOSHYx4K8TRJVmej2QHRRmMEIO/sYbfn5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359237; a=rsa-sha256; cv=none; b=mTsSHw2FZKVU99erL3Av1D60njeEkhl7OcXGMYHCcth1fYdmwuyzja0y9OC5E2Sfwp5dio EmP7Xr86S3zIg2LJxOUEJhnk4fgin0m6tsV6j0KxwTwR8G/Ltxp9W1VkFBtmywt7BP98+2 y6tiQDObcooV/S3hlHQWNG++BLELh0bTedi2HKFPRHjmbeohHUn2NcehQEgOUaGnQl7JhX vc4rL8LY7Sjz4aLTi34lrU+KeoenPOeEx6QLaa1geTsOG35npmC2NK4AzdyYO7xY93hx9f 38WG5IeoOxFbsSeEf6fnsJnqBh/J1oXiLrWwCavZhT5z4GslrXBlBQGHodjK3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359237; 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=nwJjeN5OpHYSN/OVy9CNTIJChYEraCGfmdtDpqG+l1g=; b=lRx2y3R+cUbwBfDkwvgJj9o4DLJjetjCLoUX+ST0XVSwgcLMhhevRwO7+TZMS9WYCJ6k2Y hd6Gczm0pOj0UZDWoIz7ItU7DrAwOTrTURAg2D7OrOBQdgPzC3bGX/ReEGxSvoZAO+WOqx ipZvrgtZiqip3/nDnSwujDiEK/GBqtcidmDLXbs9eVahw1QrQ5o7ZVh5b9yx2DGhVnUcC5 6UxoLbmvyIIn5UvaYeAqUoL3G35M+wDWC2jbKupe1zsqSVNT7RuANb5ZJM6TK/lJSwuYh7 lnrE44mCI2yq7t6PkOrBh/f/dCKKARnM32lcAbFqba+Csa/1EZT5117EXAFZGA== 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 4WyhdK4dMVzcFf; Tue, 3 Sep 2024 10:27:17 +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 483ARHn6010238; Tue, 3 Sep 2024 10:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483ARHva010235; Tue, 3 Sep 2024 10:27:17 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:17 GMT Message-Id: <202409031027.483ARHva010235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 92b0370ec65d - main - hptrr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 92b0370ec65d5287a1deec84fd513e320a8da736 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=92b0370ec65d5287a1deec84fd513e320a8da736 commit 92b0370ec65d5287a1deec84fd513e320a8da736 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:29 +0000 hptrr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- sys/dev/hptrr/hptrr_osm_bsd.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index 68e9af3aff02..42866c1d4297 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -1032,10 +1032,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; @@ -1252,19 +1248,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) {