Subject: Re: [PATCH v3 2/3] genetlink: disallow subscribing to unknown mcast groups

From: Bjørn Mork <[email-masked]>
Date: Wed, 04 Feb 2015 16:36:11 +0100

Bjørn Mork <[email-masked]> writes:
> Johannes Berg <[email-masked]> writes:
>
>> diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
>> index 2e11061ef885..c18d3f5624b2 100644
>> --- a/net/netlink/genetlink.c
>> +++ b/net/netlink/genetlink.c
>> @@ -985,7 +985,7 @@ static struct genl_multicast_group genl_ctrl_groups[] = {
>>  
>>  static int genl_bind(struct net *net, int group)
>>  {
>> -	int i, err = 0;
>> +	int i, err = -ENOENT;
>>  
>>  	down_read(&cb_lock);
>>  	for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
>
> This change cause serious problems for acpid, as reported on
> https://bugzilla.kernel.org/show_bug.cgi?id=92121

Ah, I see this bug is already fixed by commit 8b7c36d810c6 ("netlink:
fix wrong subscription bitmask to group mapping in").  Your change was
obviously correct, and found the long standing off by one bug.  Thanks.

Sorry about the noise.  I should have checked the current "net" first.

Bjørn