From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: [PATCH 3/7] net: FIX ipv6_forward sysctl restart Date: Wed, 13 May 2009 19:58:17 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: , Herbert Xu , Stephen Hemminger , Ben Greear , Patrick McHardy To: David Miller Return-path: Received: from out02.mta.xmission.com ([166.70.13.232]:52951 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762749AbZENC6T (ORCPT ); Wed, 13 May 2009 22:58:19 -0400 In-Reply-To: (Eric W. Biederman's message of "Wed\, 13 May 2009 19\:57\:25 -0700") Sender: netdev-owner@vger.kernel.org List-ID: Just returning -ERESTARTSYS without a signal pending is not good that will just leak it to userspace. We need return -ERESTARTNOINTR so we always restart and set signal pending so that we fall of the fast path of syscall return and setup the system call restart. So use restart_syscall() which does all of this for us. Signed-off-by: Eric W. Biederman --- net/ipv6/addrconf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a8218bc..9eb61c7 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -503,7 +503,7 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) return 0; if (!rtnl_trylock()) - return -ERESTARTSYS; + return restart_syscall(); if (p == &net->ipv6.devconf_all->forwarding) { __s32 newf = net->ipv6.devconf_all->forwarding; -- 1.6.0.6