Re: very rough if_sk fixes

From: Scott Long <scottl_at_freebsd.org>
Date: Sun, 13 Jun 2004 19:45:41 -0600
Doug White wrote:
> Hey all,
> 
> I ran out and bought a Linksys EG1032 today and fixed up some of the
> witness warnings and a detach panic.  I'm not 100% sure my lock relocation
> is totally correct, though, so if someone wants to look at this and tell
> me I have no idea what I'm doing, that'd be great. :-)  Suggestions
> appreciated.  In particular I may need to tighten up the locking and
> ordering in skc_detach() since I'm not sure if we can take an interrupt in
> that context, and it'd be kinda bad to.
> 
> Most of the changes were trivial... too trivial maybe :-)
> 
> I'm also hoarding a copy of this patch at
> http://people.freebsd.org/~dwhite/if_sk.c.diff if the attachment doesn't
> come through.
> 
> Thanks!
> 

It's typically poor practice to have to hold a driver lock in the probe
or attach routines.  If there is an apparant need then it needs to be
re-examined.  A brief look at if_sk shows no real need for the lock to
be held in sk_attach(), though the driver appears to heavily abuse
newbus so I might be missing something.

Scott
Received on Sun Jun 13 2004 - 23:47:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:57 UTC