Stefan Rompf <[EMAIL PROTECTED]> writes:

> Currently, IFF_RUNNING is created out of dev->state that is *not*
> protected by 
> any lock as the driver can change it from interrupts. Instead, atomic bit 
> operations are used. If we allow userspace to write into operstate - either 
> into independant bits that Krzysztof suggests or into my operstate_kernel 
> field - we would have races.

Not exactly. If we allow only one writer (i.e., only one protocol,
hardware etc. driver) to change a particular bit - as it's been in
current kernels - there are no races. The end result might be
momentarily unstable while flags are being changed but I don't think
it could be a problem. In fact, this isn't a new issue.

Let's face it, we aren't going to change that.

> As Thomas pointed out, this is still not perfect if the driver produces
> events 
> too fast for linkwatch workqueue, but that's an implementation detail
> and not 
> a design flaw.

What we need is a correct design _and_ implementation. What good a
design is if it can't be correctly implemented?
-- 
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to