From nobody Tue Aug 06 10:23:18 2024 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 4WdTsf4g4hz5T8xy for ; Tue, 06 Aug 2024 10:23:18 +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 4WdTsf2lb3z4Myk for ; Tue, 6 Aug 2024 10:23:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722939798; a=rsa-sha256; cv=none; b=wjmkcgGyADVNXneCQO6VQQDhNJAh6rUuY51kJLbBdhskfyvE0Ad8hWpkDD1wEdhAiZxCXp tqbiJPZcq2DxXREOqcZ+2U8tILGzV41YirOJ+hPjk7JtxCjvsmhvHCENtytWHFORo6wu2Z nY+Ae2bXME36EnTAFalCrzG4ERiR0Z/dufJpr59Qoovuu4gGfjWz74XtCO15M68cIB1izb cdU+8CfYAdRsUFqdD6xJnMxnECBbNfM92gDPUrotQ408HdWj7D5w71VLmGlZDBIDueg1Eh N0+QeQMt2Hlm+a/CYFvSJ2qpWOJn7zmJEQIuTMU6UhMRAej3pzuImLyhYuecDw== 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=1722939798; 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=JZymA+uKTsIFQXRjk9hcOBcLvnKwmsroqK69BKGEGBk=; b=YyErNygbYyVf3i4rQsLA7A8i9+V0xu7fmrNDp1V/0n5sniTiLg9AGHcJHedQB9qxjaldR9 pmO6QrEy2XEuIS4HLHQ7HIj8dq3cSoVNFRWtPkZlm/mpuVcSggCd4Tq3+lnRmdn7Qfe6Yc yuJkmce8OLXkwnBKYpMD03ZmClfpx3ZnPzM9FymrGyEAC/ZLoAX0mGjxzvz3Vi3cov+QBe Xgg87OMv9pQP6dS/uZaazETvmblLkdKD/8NuMUdYFdFkagfHylK0ylQKc3QC5H7di3xJmE y3667+BCz8R4zyUYilwIPxtgfXEJqHXHxEIBp7MJxJTd5pMAPj39/wMUShHXMg== 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 4WdTsf2MqSz13ND for ; Tue, 6 Aug 2024 10:23:18 +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 476ANIFF079666 for ; Tue, 6 Aug 2024 10:23:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 476ANIsc079665 for bugs@FreeBSD.org; Tue, 6 Aug 2024 10:23:18 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 280651] [patch] nmdm: Allow module to be force-unloaded Date: Tue, 06 Aug 2024 10:23:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: megamansec@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D280651 Bug ID: 280651 Summary: [patch] nmdm: Allow module to be force-unloaded Product: Base System Version: 13.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: megamansec@gmail.com Created attachment 252541 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D252541&action= =3Dedit Fix double lock and typo and incorrect order of locking If an nmdm device was created by accident such as by running ls /dev/nmdmAA, it would restrict the module from being unloaded, despite no data passing through it. With this patch, kldunload nmdm will still fail if any nmdm device still exists. kldunload -f nmdm will try to destroy all nmdm devices before unloading. If an nmdm modem is either opened in blocking mode or data is being passed through it, after five seconds of trying, it will not be destroyed and the unload will also fail. Likewise, fix an incorrect tty_lock, a typo, and the order of locking. --=20 You are receiving this mail because: You are the assignee for the bug.=