From nobody Sun Feb 02 16:26:29 2025 X-Original-To: bugs@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 4YmFPf5Dg6z5mM3L for ; Sun, 02 Feb 2025 16:26:30 +0000 (UTC) (envelope-from bugzilla-noreply@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 4YmFPd64cyz3ZDJ for ; Sun, 02 Feb 2025 16:26:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738513589; 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: in-reply-to:in-reply-to:references:references; bh=2um2J92NvoxcfMj3mLohws1tCGuqkU5VTtUnEYSdMns=; b=LC9Fg+o1zjoz9bzQjuEqQayllGnmIYjxkxe91f4wwWGNKDtTFm8pfPkz+am5DyRpZtAuEZ MWRpT0hzSSE4/DdJ6lqwI7mtG9BZNgAufZGF4gKXzrxc/YseGr9PrBBw6KHhFsqR2BM1i5 cElCoFaENVKXZYIPy8B8UQGyvLX5B/N5MmOvB5X9K/8Nl9TCbxVz0XgqI5iEJ16LtqP6mH DNGdB3XOzoa2ZWIgwRME9rB0wWEr/icwuLBCwAhqaKwFbs2lzzZzm29nSBXkrNhrFplqDQ EdpWP1mjaeykEZqsiFVy7bWBQoAeYrWb8eI83LpG58WkYAd2meYwJB0gwZad7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738513589; 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: in-reply-to:in-reply-to:references:references; bh=2um2J92NvoxcfMj3mLohws1tCGuqkU5VTtUnEYSdMns=; b=naTcf8eHxD3Fl7yDCEtZDFtnqSxSXZZ/Aa1rSgu4xA2g5YijoGd2qi1RZb2OEFT6H08++7 3mTjhT3UAGIUHqMruEfxJVby+t3wRqBNLZQisDAWUhSdMk2NlwMKcmRsFFEKjeBx279g5r dUqGWt50gEz/gWDR421JC6/0dbvIBfebmtw+jYhnmrcHYUXu0D5MUi6me1iaVafe1e6mXo i5iQHqykPIU+giuq6Y/M/hlY9fu3JdWmFgQoBd1ZRvxhsajQ2If8MmP81z5jBZgxBcGDLy D3sa8m4pV4XvKLJ4Y73k0xJgpRr3tA6f8fil2SqV/YgHNwuKYvvnOmPFJ+KjrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738513589; a=rsa-sha256; cv=none; b=bTc1721b/EZQ5e1dki/3GEXp4zUHGB2A+9cBbvHVtcLsUM6T2HqilrHzxu6HLA8O5H08O6 d9IYFURZxtxgMpUKcCvNDN9F08BTIDAw922j+90WsA9Vz+Be4Pxensoe9J+ykyIN3KUApJ PuRCiSiqwKTtBGXgEDJ6A1cJMBFrD4LqMWOuT5Oggk+lsQraWLJtdveVyCYfS6qaRJl7mi +OMIkNp4UWq3tDcDlcCoDXYWKEuf0SAQupnEFm0iNFOMAp+/WgmD9U6tg/UwXI44izUt/e egK+tYc1514gOEEeyguErEWN36R4vWPNeSmd3A66CSTQipPflUAi7wEVHE95pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4YmFPd5c4wzxS9 for ; Sun, 02 Feb 2025 16:26:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 512GQThp027306 for ; Sun, 2 Feb 2025 16:26:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 512GQTkD027305 for bugs@FreeBSD.org; Sun, 2 Feb 2025 16:26:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 217785] sys/dev/mpr/mpr.c: PVS-Studio: Dead Code (CWE-561) Date: Sun, 02 Feb 2025 16:26:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: imp@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Not A Bug X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution cc bug_status Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217785 Warner Losh changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |Not A Bug CC| |imp@FreeBSD.org Status|New |Closed --- Comment #1 from Warner Losh --- So this bug doesn't matter. sc->num_reqs is used only to allocate commands and free them on detach. On a panic, neither of these paths is used. So it doesn't matter if this happens before or after the panic. It won't affect the panic. Sometime people make panics advisory (not something in the base). In these cases it's not dead code. And honestly it doesn't matter where it's set. Also, there was a though, ages ago, that this shouldn't be a panic. First, = it's a relatively rate situation. Allocating the DMAMAP at this point in the code should always be possible, except if you load the mps driver during a severe memory shortage / fragmentation condition. Second, the driver should be abl= e to cope with the fewer commands, though not as efficiently. It's a no win situation, and as the comments state, it's not at all clear this is a fatal condition. Some users have run with this line commented out. So while there's nothing wrong with this patch, I'm going to reject it and = the sister report for mps. It's one more change to the driver I have to test, compile and spend time on that gives no benefit. --=20 You are receiving this mail because: You are the assignee for the bug.=