kern/119422: Kernel panic (page fault) with devfs rules

Jille Timmermans jille at quis.cx
Mon Jan 7 07:50:02 PST 2008


>Number:         119422
>Category:       kern
>Synopsis:       Kernel panic (page fault) with devfs rules
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 07 15:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jille Timmermans
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
None
>Environment:
System: FreeBSD blackbox.quis.cx 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Sun Jan 6 23:24:15 CET 2008 root at blackbox.quis.cx:/usr/obj/usr/src/sys/BLACKBOX i386
And: FreeBSD istud.quis.cx 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Sat May 12 16:41:58 CEST 2007 root at istud.quis.cx:/usr/obj/usr/src/sys/ISTUD i386


>Description:
	A kernel panic (page fault) occurs when trying to add/apply rules to a devfs mount.
	A value of a null-pointed struct is used in devfs_rule_match().
	(/usr/src/sys/fs/devfs/devfs_rule.c:546)

	I can give you kernel dumps/backtraces if needed.
>How-To-Repeat:
	# mkdir dev
	# mount -t devfs devfs dev
	# devfs -m dev ruleset 50
	# devfs -m dev rule add type disk hide
	# devfs -m dev rule applyset
>Fix:
	In /usr/src/sys/fs/devfs/devfs_rule.c:546
		if (dev == NULL ||
	Change into:
		if (dev == NULL || dev->si_devsw == NULL ||

	I changed this and recompiled, the crash didn't occur anymore.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list