Summary: | BTX Halted upgrading FreeBSD 11.2 UFS from r344213 to r345199 | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | john | ||||
Component: | kern | Assignee: | Toomas Soome <tsoome> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | pi | ||||
Priority: | --- | Keywords: | regression | ||||
Version: | 11.2-STABLE | Flags: | koobs:
mfc-stable12?
koobs: mfc-stable11? |
||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
john
2019-03-17 04:32:11 UTC
Created attachment 202946 [details]
Patch for crash
Here's what seems to be happening ...
1) bd_init calls bd_int13probe which creates entries for the various
drives, including the card reader. Unfortunately bd_sectorsize
is set to zero for the card reader (presumably because no media
is present).
2) zfs_dev_init calls i386_zfs_probe which uses zfs_probe_dev to
probe all the drives.
3) zfs_probe_dev -> open -> disk_open -> ptable_open -> ptable_iso9660read
at which point things go splat due to cdb2devb attempting to divide
by the sector size (which is zero).
Fixed by having disk_open check for a sector size of zero.
A commit references this bug: Author: tsoome Date: Sun May 5 06:38:48 UTC 2019 New revision: 347142 URL: https://svnweb.freebsd.org/changeset/base/347142 Log: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com MFC after: 1 day Changes: head/stand/common/disk.c A commit references this bug: Author: tsoome Date: Mon May 6 08:32:50 UTC 2019 New revision: 347179 URL: https://svnweb.freebsd.org/changeset/base/347179 Log: MFC r347142: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com Changes: _U stable/12/ stable/12/stand/common/disk.c A commit references this bug: Author: tsoome Date: Mon May 6 08:55:23 UTC 2019 New revision: 347182 URL: https://svnweb.freebsd.org/changeset/base/347182 Log: MFC r347142: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com Changes: _U stable/11/ stable/11/stand/common/disk.c |