On Tue, 2007-07-17 at 17:45 +0200, Patrick McHardy wrote:

> > --- wireless-dev.orig/net/netlink/af_netlink.c      2007-07-17 
> > 14:05:30.210964463 +0200
> > +++ wireless-dev/net/netlink/af_netlink.c   2007-07-17 14:05:30.720964463 
> > +0200
> > -static int netlink_alloc_groups(struct sock *sk)
> > +static int netlink_realloc_groups(struct sock *sk)
> >  {
> >     struct netlink_sock *nlk = nlk_sk(sk);
> >     unsigned int groups;
> > +   unsigned long *new_groups;
> >     int err = 0;
> >  
> >     netlink_lock_table();
> 
> 
> This is actually a bug in the current code I think, netlink_lock_table
> is a reader lock.

Looks like, changed to netlink_table_grab()


> > +int netlink_change_ngroups(int unit, unsigned int groups)
> 
> 
> I think it would be more consistent to pass the kernel socket
> instead of the unit.

Alright, changed. Also added kernel doc for the function.

> This might set the group to a value < 32. I don't expect it matters,
> but when I changed to old code to support > 32 groups I enforced
> a minimum of 32 so anything outside the kernel multicasting on them
> would still work (even though its a really stupid idea). So for
> consistency this should probably also use a minimum of 32.

Huh ok. Fixed, and added to documentation.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to