Subject: inbound connection problems when "netlink: test for all flags of the NLM_F_DUMP composite" commit applied

From: Arthur Marsh <[email-masked]>
Date: Sun, 16 Jan 2011 19:24:41 +1030

This bug was originally posted at https://bugzilla.kernel.org/show_bug.cgi?id=26632 
 
With kernels up to and including 2.6.37-git7, inbound telnetd-ssl connections worked fine. 
With kernel 2.6.37-git9 and later inbound telnetd-ssl connections failed, and on machine shut-down, there were warning messages about daemons not return status. 
 
A git bisect on Linus' kernel tree revealed: 
 
0ab03c2b1478f2438d2c80204f7fef65b1bca9cf is the first bad commit 
commit 0ab03c2b1478f2438d2c80204f7fef65b1bca9cf 
Author: Jan Engelhardt <[email-masked]> 
Date:   Fri Jan 7 03:15:05 2011 +0000 
 
    netlink: test for all flags of the NLM_F_DUMP composite 
 
    Due to NLM_F_DUMP is composed of two bits, NLM_F_ROOT | NLM_F_MATCH, 
    when doing "if (x & NLM_F_DUMP)", it tests for _either_ of the bits 
    being set. Because NLM_F_MATCH's value overlaps with NLM_F_EXCL, 
    non-dump requests with NLM_F_EXCL set are mistaken as dump requests. 
 
    Substitute the condition to test for _all_ bits being set. 
 
    Signed-off-by: Jan Engelhardt <[email-masked]> 
    Acked-by: Pablo Neira Ayuso <[email-masked]> 
    Signed-off-by: David S. Miller <[email-masked]> 
 
:040000 040000 1a0717ab0c87787309c3c3af88d666b44f327f64 
cba6279de85b7ebeaf21f19f1d93b59468fdd01d M      net 
 
I tried git cherry-pick 0ab03c2b1478f2438d2c80204f7fef65b1bca9cf and verified 
that the resulting kernel had these problems, then git revert 
0ab03c2b1478f2438d2c80204f7fef65b1bca9cf and verified that the resulting kernel 
did *not* have problems. 
 
Arthur.