From nobody Fri Jul 04 13:28:48 2025 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 4bYZGS4SQDz614wl; Fri, 04 Jul 2025 13:28:48 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bYZGS36knz3MBp; Fri, 04 Jul 2025 13:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751635728; 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=NXEnTnxlEs86RER/o/Z20z4YAGG8g7lRqGNcikw8NNE=; b=n+UapfKoK/zvw3Kptin21yCw1hyDs1Ewbj8zwFXWqiuA7zaPmcBwzqVHg5FSeX2JVoK9aD ipbzNioDdfDKcKTU5njNC8spER0DkFhqNks2typQu6JSD179+6HQFoit9Tx4GuJ+04YlA8 hIpIVPm1M8t8axCEdq3FaV8KrRTd17IR1CI8RG9OPVt3fpIU82QV2Q83WPjleow0CNoxJc eWU6FV/1TwpKXOfvROs/WRuA2O7xViplimXKqHxHyoPRxsCZNNQDTfkgF9oShCwK2nnoI1 RSDqLSa1VWLLRTCGHOMZS9egOqSOzJOVX4t4+oPMQvlg2Su0edKhhTDRzJhEgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751635728; 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=NXEnTnxlEs86RER/o/Z20z4YAGG8g7lRqGNcikw8NNE=; b=Fp9GWzDd6dwjwj+J+C7UMZVjY+edFMmO5kA6B3/lSG910KUPtlEqIyTDTn/m3wtsuANCBl VdfqNBUPqenHwYkBU/QPGD9xLo3M8/Papqty3NfW7Q6I8vR4YiagziSZteOZflqu0SpRfv DA1Dobt/2KFTwhuKnWeg7AVR7vxIXJx5+pwSt05ShOlHHLTN+jKTnUaaoi2tcpB77jn9Zv 77c8D7tgE197QEm3sM566JwttTYw8xe+VGoF+6gE4XuISr7wUR6eBbkBxHphY7DdRJTgXX seXSPmYfcUtqq+2UtN3UlWZ2X4LDaRrQs+Zr6swelGVT/sjn5/F37Z5zec6Uvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751635728; a=rsa-sha256; cv=none; b=aCvovdfdyRsPhyKYxe/i2ez/3dvmpYC+rAbe3zpgXfC3f5M5sumTOvc8ZG+mYKOq1fB5ND pUimpBPPTRO3XkiVONzG+AxmBGsKtEdMxCHm5nCzXElPMYPhuhzlZiSxhjOfYv6FnnzHK+ gKABzbsXkI4i8m1LWN9RpIZ9sdjYw2xCgo+a3wI0fN/6763Jyo2q4plgqptATCn4tsPg2A xk8KU0COKX5RIdNqmhjsQVvHcIqwWUbqeVPnJSDTEzvu01Ikm7WzS6QrkZEEz+pZtVQcaX WPHK6p2tm82PK1rLr9ZK92W8rMpkGH3RhXqJAP/wmSxntOKq8Dd8sft4cnteBQ== 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 4bYZGS2Vwxzs10; Fri, 04 Jul 2025 13:28:48 +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 564DSmD4005918; Fri, 4 Jul 2025 13:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 564DSmd2005915; Fri, 4 Jul 2025 13:28:48 GMT (envelope-from git) Date: Fri, 4 Jul 2025 13:28:48 GMT Message-Id: <202507041328.564DSmd2005915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Popov Subject: git: 201d2e45f51f - stable/14 - p9fs: use M_WAITOK where appropriate 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: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 201d2e45f51fee2b1438bcc0a53a51bd6416ea73 Auto-Submitted: auto-generated The branch stable/14 has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=201d2e45f51fee2b1438bcc0a53a51bd6416ea73 commit 201d2e45f51fee2b1438bcc0a53a51bd6416ea73 Author: Ed Maste AuthorDate: 2024-06-24 20:10:00 +0000 Commit: Gleb Popov CommitDate: 2025-07-04 13:28:06 +0000 p9fs: use M_WAITOK where appropriate device_attach routines are allowed to sleep, and this routine already has other M_WAITOK allocations. Reported by: markj Reviewed by: markj Fixes: 1efd69f933b6 ("p9fs: move NULL check immediately after alloc...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45721 (cherry picked from commit e6b88237c6c33fe2f66cad9836858b877900871a) --- sys/dev/virtio/p9fs/virtio_p9fs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index 1c076e353bbc..e87659da2732 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -331,12 +331,7 @@ vt9p_attach(device_t dev) /* Initialize the condition variable */ cv_init(&chan->submit_cv, "Conditional variable for submit queue" ); chan->max_nsegs = MAX_SUPPORTED_SGS; - chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_NOWAIT); - if (chan->vt9p_sglist == NULL) { - error = ENOMEM; - P9_DEBUG(ERROR, "%s: Cannot allocate sglist\n", __func__); - goto out; - } + chan->vt9p_sglist = sglist_alloc(chan->max_nsegs, M_WAITOK); /* Negotiate the features from the host */ virtio_set_feature_desc(dev, virtio_9p_feature_desc);