Project

General

Profile

Bug #260

some drivers erroneously discount a major of 0

Added by Rich Lowe about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2010-09-25
Due date:
% Done:

0%

Estimated time:
Difficulty:
Tags:

Description

Solaris bug 6975280 t_kopen() fails if transport major device = 0

Occurs because, during the ON/IPS transition, changes were made such that all drivers for which it was possible would be added to the system by packaging, rather than delivered with the base files (for a small handful of packages, this was not possible).

Unfortunately, this made major number 0 dynamic (where previously it was always the console device), and, it turns out, some drivers treat a major number of 0 as invalid. In 6975280 we see TLI treating a major/minor of 0 ((dev_t)0) as erroneous:

source:usr/src/uts/common/ktli/t_kopen.c@13195#L97

        if (rdev == 0 || rdev == NODEV) {

and by inspection we also find that sv(7D) does the same thing:

source:usr/src/uts/common/avs/ns/sv/sv.c@13195#L911

    if (udev == (dev_t)-1 || udev == 0) {

These cases should be fixed (and sv should be using NODEV).

It is perhaps a good idea to remove major 0 from use, to avoid other devices becoming confused in this manner (auditing for the mistake is proving particularly cumbersome). I favour causing add_drv(1M) to begin filling the major space from 1, though there are other alternatives which could be pursued.

History

#1

Updated by Rich Lowe about 9 years ago

  • Status changed from In Progress to Resolved

Resolved in r13208 commit:aecca69fdd0e

Also available in: Atom PDF