From nobody Mon Sep 30 05:08:27 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 4XH8Gz6K2vz5XlmP; Mon, 30 Sep 2024 05:08:27 +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 4XH8Gz3V6Mz4XG4; Mon, 30 Sep 2024 05:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672907; 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=9KunISfC+cNf94G4uHtZWE4z0tAbuOBDMoBm54mRWZs=; b=dGQRrZ00ZrTO4a5K/OJk7YtJHA/oy0COqi+KekYKJ85mRJdMtUtYAEKAYmLNLqxpv4Nv3I hf+J0YR4KS5fqtQbZKNh9LmO30F5lCUQeYjC8E3BqIS7hK/oDkel5OS3X8zrpdnQLCEZXG vijRSP/oVwmq7VotnPPP8jrt6BSqcOJHZlvS0OA7lrh+I9v68THdJxGWwiJbfKLjLFNSrj qQHWElZOJc8Wsc3Jx+mR31yZ77gletC5U89FYdUo1Mfi162UyRoMcrd/y46MCjuJ77WgHh pv6Xd2gQYUahT2ePce7L3LRUUNobRBnjNx4SoFbHWJigb7k3chgl8N3//Ts/7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672907; 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=9KunISfC+cNf94G4uHtZWE4z0tAbuOBDMoBm54mRWZs=; b=Hw14M+9IJulKwtSLqpk7mLMOV1DNLAxo01QLFylQr6f9uvlmCoMK3hHSXoHwN2Lb7vBBRG 5Zx6FVnb70pEKySrUHwdM0RdbgqzoHkakd+199hTkCfz8rE76vlFetDZrYcdNm7/koHqsu 7qpAS9+XHwMT7+jZu291fJlHIfZDAJLpw6Ro0QiqpDppRWv5lPMeCTYbbXYxaTy7bial4l wdwrTVCLTMQuv3v62pNZMFiYgm94UdEYkT7yapFcgayxZ16iCPgnqoYtq+qOJ01O+/iZW+ EBGmsYAAaMpAd7YxJgvy+mdHZafhaFJfeCrGNjdzcwof+WrDmxzFEql9qglrTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672907; a=rsa-sha256; cv=none; b=OmSjG612fWo5ZlDL+7VL8oXmA71ifSweHbw+YyOChny1BkWZ7SL6UxDFNSHnMShvJQPHM4 thm9XVCUHhLtw5V61IXAelULY7CdDzGzS6Nl87eMiUnOl0Ck+d4HUgT8djxNe1DTYqJtgk /mbOtwJAOAfgWsZ7xchCtwe59qKq8YYNcxSZmONP+4E9eTvhLpwPZv+bpwGu/P4SLrFOFZ tT7T8bFv1HV3TiI8oV8Yf45aPGw2c6Y0+ImVkzlikLEQuIkid0ifiHOiTu13x3EYugEsce pobR8kEE0ZyQYVcluhcGKm+TaPe+sfSovUxnVijVpGAY1IYuV5j1HFnWuMwfQw== 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 4XH8Gz36f7zgB0; Mon, 30 Sep 2024 05:08:27 +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 48U58R0Y025218; Mon, 30 Sep 2024 05:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58RCV025215; Mon, 30 Sep 2024 05:08:27 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:27 GMT Message-Id: <202409300508.48U58RCV025215@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: 736dfe255d89 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 736dfe255d8918188eb5b6cc4b64b0297dc6f15d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=736dfe255d8918188eb5b6cc4b64b0297dc6f15d commit 736dfe255d8918188eb5b6cc4b64b0297dc6f15d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +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) (cherry picked from commit c860df902b6d010cb18490580c776c4b0a6a9123) --- 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 067b8530cd3e..d605cf7712f3 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; @@ -1611,19 +1606,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) {