NetBSD Problem Report #56287

From blymn@internode.on.net  Wed Jun 30 22:08:49 2021
Return-Path: <blymn@internode.on.net>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 80D8F1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 30 Jun 2021 22:08:49 +0000 (UTC)
Message-Id: <202106302203.15UM3vax001623@rover.localdomain>
Date: Thu, 1 Jul 2021 07:33:57 +0930 (ACST)
From: blymn@netbsd.org
Reply-To: blymn@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: pmf_class_network_suspend in kern_pmf.c needs a KASSERT
X-Send-Pr-Version: 3.95

>Number:         56287
>Category:       kern
>Synopsis:       pmf_class_network_suspend in kern_pmf.c needs an assert
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    martin@netbsd.org
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 30 22:10:00 +0000 2021
>Last-Modified:  Thu Jul 01 00:02:08 +0000 2021
>Originator:     blymn@netbsd.org
>Release:        NetBSD 9.99.85
>Organization:
dis
>Environment:
System: NetBSD rover 9.99.85 NetBSD 9.99.85 (ROVER) #3: Wed Jun 30 16:50:40 ACST 2021 toor@rover:/usr/obj/sys/arch/amd64/compile.amd64/ROVER amd64
Architecture: x86_64
Machine: amd64
>Description:
	I have just committed a fix to kern_pmf.c to protect the
function pmf_class_network_suspend from calling a NULL if_stop which
would result in a kernel panic.  There are a bunch of usb wifi drivers
that do not set this function pointer.  Once the drivers are fixed the
printf in the function should be converted to a KASSERT to report
buggy drivers.
>How-To-Repeat:
	Try to sleep a machine with a urtwn wifi device attached, observe
the printf firing.
>Fix:
	Once the wifi drivers have been reworked, convert the printf to
a KASSERT.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->martin@netbsd.org
Responsible-Changed-By: blymn@NetBSD.org
Responsible-Changed-When: Wed, 30 Jun 2021 23:23:30 +0000
Responsible-Changed-Why:
Make Martin responsible as per his request.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.