|
Description
|
The smp_open_ref is the reference counter of open&close operation for each smp instance. It's used incorrectly(+1 in open, -1 in close) because the invocation of smp_open and smp_close in kernel is not symmetrical. In case that one smp device minor is opened multiple times, each open from userland will invoke smp_open in kernel, while only the latest close will invoke the smp_close in kernel. This makes the reference counter nonzero after the latest close. From then on, open with O_EXCL flag will always fail because reference counter is not zero.
|