Bug 161912 - [kernel] [patch] kernel sends incorrect notify to devctl about device changes
Summary: [kernel] [patch] kernel sends incorrect notify to devctl about device changes
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jaakko Heinonen
URL:
Keywords:
Depends on:
Blocks: 223531
  Show dependency treegraph
 
Reported: 2011-10-23 01:40 UTC by Yuriy Taraday
Modified: 2017-11-16 09:46 UTC (History)
0 users

See Also:
jh: mfc-stable10+
jh: mfc-stable9?
jh: mfc-stable8-


Attachments
file.diff (904 bytes, patch)
2011-10-23 01:40 UTC, Yuriy Taraday
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Taraday 2011-10-23 01:40:05 UTC
When new device node is created or destroyed, kernel sends notify to devctl in this form:
  !system=DEVFS subsystem=CDEV type=DESTROY cdev=<DEVICE NAME>
where <DEVICE NAME> is being substituted with the name  of device.
If device name contains whitespaces, devd scraps out everything but the part before the first space in cdev parameter, so we can not correctly handle device name in devd.

Fix: See attached patch. It wraps <DEVICE NAME> in double quotes so that devd ignores spaces in it.

Patch attached with submission follows:
How-To-Repeat: I found out the problem when I was looking into what happens in devd when I insert my USB flash drive. System eventually creates "msdosfs/ADATA UFD" device, but devd handles it as "msdosfs/ADATA" device.
Comment 1 Jaakko Heinonen freebsd_committer freebsd_triage 2012-12-22 15:25:40 UTC
State Changed
From-To: open->patched

Patched in head. 

http://svnweb.freebsd.org/changeset/base/244584 
http://svnweb.freebsd.org/changeset/base/244585 


Comment 2 Jaakko Heinonen freebsd_committer freebsd_triage 2012-12-22 15:25:40 UTC
Responsible Changed
From-To: freebsd-bugs->jh

Take.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2017-01-22 04:14:53 UTC
Fixed in all supported releases.