lkml.org 
[lkml]   [2013]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [ 82/89] netfilter: xt_hashlimit: fix race that results in duplicated entries
From
Thanks Pablo.

I have a question about commiting the patch for kernel.

Because i am the reporter of this issue, and I sent the similar fix to
netfilter maillist and the owner of the xt_hashlimit.c before.
Now it is that Greg commits the patch for this issue, not me, although
the fix is similar with that I sent before.
I am just a little disappointed, not explain.
Because I would be very prond of as the contributor who could commit
patch to linux.

So I wonder How could I commit the patch to kernel directly or how to
let owner could adopt my fix directly next time?

BTW, I still be prond as this issue reporter.

Best regards.
Feng Gao


On Sat, Feb 2, 2013 at 12:34 AM, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Fri, Feb 01, 2013 at 11:04:36PM +0800, Feng Gao wrote:
>> Hi Greg,
>> I have a question.
>> There are two duplicated lines now.
>> dh->expires = now +
>> msecs_to_jiffies(hinfo->cfg.expire);
>> rateinfo_recalc(dh, now, hinfo->cfg.mode);
>> 1# case: The dsthash_find return a valid dh;
>> 2# case: There is a race. The race is true.
>> Why we could not adopt the method I sent before.
>> dh = dsthash_find(hinfo, &dst);
>> if (dh == NULL) {
>> dh = dsthash_alloc_init(hinfo, &dst, &new_node);
>> if (dh == NULL) {
>> rcu_read_unlock_bh();
>> goto hotdrop;
>> }
>> }
>> if (new_node) {
>> dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire);
>> rateinfo_init(dh, hinfo);
>> } else {
>> /* update expiration timeout */
>> dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);
>> rateinfo_recalc(dh, now, hinfo->cfg.mode);
>> }
>> I think it could avoid the two duplicated lines.
>
> That's a cleanup, send me a follow up patch for that if you want.
>
> Greg, please, don't back down this patch, it's fixing a real problem.
>
> Gao is proposing some code refactoring to save line a couple of lines
> of code.


\
 
 \ /
  Last update: 2013-02-01 18:43    [W:0.094 / U:1.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site