Re: [patch 51/61] lock validator: special locking: sock_lock_init()

From: Ingo Molnar
Date: Fri Jun 23 2006 - 06:09:57 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> > +/*
> > + * Each address family might have different locking rules, so we have
> > + * one slock key per address family:
> > + */
> > +static struct lockdep_type_key af_family_keys[AF_MAX];
> > +
> > +static void noinline sock_lock_init(struct sock *sk)
> > +{
> > + spin_lock_init_key(&sk->sk_lock.slock, af_family_keys + sk->sk_family);
> > + sk->sk_lock.owner = NULL;
> > + init_waitqueue_head(&sk->sk_lock.wq);
> > +}
>
> OK, no code outside net/core/sock.c uses sock_lock_init().

yeah.

> Hopefully the same is true of out-of-tree code...

it wont go unnoticed even if it does: we'll get a nonfatal lockdep
message and fix it up. I dont expect out-of-tree code to mess with
sk_lock.slock though ...

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/