From nobody Tue Jun 25 02:02:41 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 4W7SlP4ywKz5Q7T1; Tue, 25 Jun 2024 02:02:41 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7SlP4SG6z4Y3d; Tue, 25 Jun 2024 02:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719280961; 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=6V5HIRYzeeDyIIhXTF3g9SQMtjE5jA3Fc96/8A5gWfk=; b=LJCkGKbmw6CQcyOTAobJ4+itkjQAUlERfrVcz6AcypS39ctjsu9KCN17FgFBNjFLLFaokq YfgtPTQhp+aiVg9OdEfryg1MlT/OF304DwBuwHrRrWA+WgbVsWFmD5gak2clqxJ/q2uEmF cDojR/mYebeEqyTy5JZFkUhDlx4CkomlVz9a4+z3VTjD65nsdWaRzRFe8zvJ4ZzbTa0uFJ 6fswO/a8ksVLz1jiYshyJV/Itki0tDa/ENrWjAprXqn9ccWBtzjTsCb4TIpg3tq1ZAEv/K zVSXoLr4070VqjEmZGELTgk4ody1NU+5MygG8/l2AlwNlXGsLvpJiQSuXK1Lzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719280961; a=rsa-sha256; cv=none; b=Dj8d5HT5J5cMCKepsyGN5Y4BpXxp9+4zmhlHSL8EWJ1AUQeDHbT4yvFgXGIMGD/V4GGegs Xil80WudanZnq4S3aHFKXWJZG6KdWf8u6sCn8baBJyy1G0fMkvLDXpSLAx9WLpmBX0S3QR 5xj7xEK3uaTznsp2ZtnkTJKskzeIzMRioQKL8XvA1qsXX8eGsr5zuwadO4TuDgjnTLnKT4 Xub2yFNRlQYrWG6rHOCbUb7vBG02rIgFPQRSk1QILQ82Z46gUaZT1aolwSjpYTJJSO9gal 27NANNT9ju2Nl9G3AO5TOYimyKzRm9thZ3nujrU3C7L18/wMBCJ+EOujObqapg== 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=1719280961; 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=6V5HIRYzeeDyIIhXTF3g9SQMtjE5jA3Fc96/8A5gWfk=; b=eC8SNJXAO0wwW7PSBgXIG5z9jA/LY6sIEplh8zS49VmD23Y8rGvH/Cir0NXU+ACh3fqoPv Q+B7uMKh8tejKaedfvY0sJshd3KJ0QddrcOfHzRTjE40z2/kpyyvxx2wPnLTy6RUuO5+t1 OhwOPXLkkEfYWbjSmGqunvfUPUwTOPw4+NNuoVgacdhySsqR0viPMM7ZX54HZp7v4JKaNN h9HQQ3lm5yIJwuxQQvskYteouQA1O2lGfrvu/YzfbX4s1rsOX50A1eybUp2CrpbYQOdPwX OEtUHJDFHofdht6TNboYFgfqE/QGjbyhIckSunT1aert2o9+aAIcaNY7uMyVnQ== 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 4W7SlP43jZzjbb; Tue, 25 Jun 2024 02:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45P22fEC046733; Tue, 25 Jun 2024 02:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P22fw3046730; Tue, 25 Jun 2024 02:02:41 GMT (envelope-from git) Date: Tue, 25 Jun 2024 02:02:41 GMT Message-Id: <202406250202.45P22fw3046730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e6b88237c6c3 - main - p9fs: use M_WAITOK where appropriate 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6b88237c6c33fe2f66cad9836858b877900871a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b88237c6c33fe2f66cad9836858b877900871a commit e6b88237c6c33fe2f66cad9836858b877900871a Author: Ed Maste AuthorDate: 2024-06-24 20:10:00 +0000 Commit: Ed Maste CommitDate: 2024-06-25 02:02:13 +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 --- 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 811faff6cd93..aa174d3bd5ba 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);