From nobody Mon Sep 30 05:08:28 2024 X-Original-To: dev-commits-src-branches@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 4XH8H10RdTz5XlmT; Mon, 30 Sep 2024 05:08:29 +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 4XH8H04LSLz4XGC; Mon, 30 Sep 2024 05:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672908; 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=/SEmSLW4Lte93woYMQxXuAVv/dPHUCbNYju7Ja+y5eA=; b=dsJcBupxhDR68uZJbdMxaTCEGccym4H6XOUMTyvka+LlV5WJgO7xbbOJVCs2l7mNNYUcE0 b5JRKRfuu2PJAJKWxfEfvmRo13YxYUb52cmRGS9TJIfCPL9VmTQwocbotLHStTOBfMR78V 7g1wAHqLi0paiV3l0aIdJncKF/oFpvWhcLRqeOeobj3Hd9vtx6GWAquxzecK0MndKN5G2S JnxqD2vwIzUOAsSPuN94opjXwcuAhGpFiUXaWUAxZwYgFfVztB02WHlCpcpnL19ptD9lDj 9LQcRxxnqmtILoU63KyzmYP54xuxsXz/x91MIF10g6UEjYXL1zjIr5/i0iFNFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672908; 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=/SEmSLW4Lte93woYMQxXuAVv/dPHUCbNYju7Ja+y5eA=; b=Dl+KNPC0ebyITxuQpE17vuDtESmKYsrmDPM/mvyd/wuoE8W47MpAie6f45vxdhlpIn+jUz DlGQHB7b1T3vhGIXfIYOnauq8Hnc1NNTbSTo/XArTfQJ2xu6MkBoIEG45dLcVKPuht7uBE 1INeKJ66rtFr8/ugwTJjpJBE4J5p7cAer0XU93Nddyi5wsoNLYT7b062FnZlk4BbwwvxC8 mnyEh98xTiXhj48WFpN5MBovRD8myXA4xqmoUzOWVRUAFiYBzz0Q8sMh0ZcnbTU9r/y0bO D/OvMkzsstwP+1molU25oxoQwfOwHJySUQ4aL/GzzCqLE6IO9bdR4AbYZISCcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672908; a=rsa-sha256; cv=none; b=tLsDCxQst7FU/QNBNmHHwVOl3vKH1DJPYOXsK2ywo+newjcEmAhUsgXXobGEnvLLbYnpUj AcQSPVLC4H3S5Nw8l4RK6you2eHqeEdaJTBuL/enX2riqI/LwyDDokN+Gy/z6N9wPb3I9u pBvxH9a0wdx8hrtLlqvKY1HGgRTzEzk7xccUXj9ZaYNj59egYVNawI0VgxZLxmYPSEcbHy ELDTgWb2zUNEnsLQVnjJ08Mxc7W4c5zitvyA+YJDVN46NBhSWAcuTqyJHPzM8anhfCRt9D MR3Q6f5eqovM/L/ddfVy4XHk8/58OLxXQ+QXBBYwxUyfZqRui8dzbZFAHROP6Q== 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 4XH8H03y5ZzfQq; Mon, 30 Sep 2024 05:08:28 +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 48U58SaU025266; Mon, 30 Sep 2024 05:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U58S9i025263; Mon, 30 Sep 2024 05:08:28 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:28 GMT Message-Id: <202409300508.48U58S9i025263@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: e86d353a893f - stable/13 - hptrr(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: e86d353a893f5f57ba420fef5fd5a1486ab64ae9 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e86d353a893f5f57ba420fef5fd5a1486ab64ae9 commit e86d353a893f5f57ba420fef5fd5a1486ab64ae9 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:29 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:36 +0000 hptrr(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 92b0370ec65d5287a1deec84fd513e320a8da736) (cherry picked from commit e4de0a965faaff171e6061714478c8f4eaec8cb1) --- 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 fd102397716c..ca1e5714d33e 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; @@ -1253,19 +1249,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) {