[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1ocjksssg.fsf@fess.ebiederm.org>
Date: Fri, 19 Feb 2010 15:35:27 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: Fix sysctl restarts...
David Miller <davem@...emloft.net> writes:
> From: ebiederm@...ssion.com (Eric W. Biederman)
> Date: Fri, 19 Feb 2010 15:22:59 -0800
>
>>
>> Yuck. It turns out that when we restart sysctls we were restarting
>> with the values already changed. Which unfortunately meant that
>> the second time through we thought there was no change and skipped
>> all kinds of work, despite the fact that there was indeed a change.
>>
>> I have fixed this the simplest way possible by restoring the changed
>> values when we restart the sysctl write.
>>
>> One of my coworkers spotted this bug when after disabling forwarding
>> on an interface pings were still forwarded.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
>
> What commit added this bug?
When we I fixed the deadlock that can happen if you write to forwarding
while removing the device. The deadlock was fixed, the restart worked
but I somehow missed the fact that proc_dointvec modifies state and so
defeated the change detection. *embarrassing*
commit 9b8adb5ea005fe73acd5dd58f9bd47eafa74c9d1
Author: Eric W. Biederman <ebiederm@...ssion.com>
Date: Wed May 13 16:59:21 2009 +0000
net: Fix devinet_sysctl_forward
sysctls are unregistered with the rntl_lock held making
it unsafe to unconditionally grab the the rtnl_lock. Instead
we need to call rtnl_trylock and restart the system call
if we can not grab it. Otherwise we could deadlock at unregistration
time.
Signed-off-by: Eric W. Biederman <ebiederm@...stanetworks.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists