for function nlm_lookup_host in fs/lockd/host.c, when the host found is not the head in the bucket in the hash table, it will be moved to head. source is like this, --------------------- if (hp != nlm_hosts + hash) { *hp = host->h_next; host->h_next = nlm_hosts[hash]; nlm_hosts[hash] = host; } -------------------------- won't it lose hosts that are originally between the one to search for and the original head? for *hp is not handled after *hp = host->h_next; this problem covers rhel4 and rhel5. i think it fixed in kernel 2.6.20.
Reassigning to kernel component. Read ya, Phil
Created attachment 156070 [details] test program Wow, for only being 4-5 important lines this is hard to figure out. It looks like upstream moved all of this to hlist routines, which is good, but I don't think we can do that in RHEL5 w/o breaking kABI. After staring at this for ~ an hour and playing with stuff on paper, I gave up and wrote a test program to see whether this was broken. I think it's equivalent to what the kernel code does. Testing this empirically shows that this code works as expected. When it finds a match, it moves it to the top of the list and everything else is still linked into the list. I'm thinking this is NOTABUG, but I certainly wouldn't mind someone double checking me on this.
Setting to NEEDINFO reporter... Could you sanity check my test program and make sure that I'm not missing something? If it looks OK, then I'd suggest we close this as NOTABUG.
No response from reporter for 2 weeks. Closing as NOTABUG. Please reopen if you believe this conclusion is incorrect.