Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp638563ybt; Wed, 1 Jul 2020 06:47:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXXd4DADMNvdR42fRmzxtNqUtEGrG5QkVaLNWL6jJlwcvs/VwZZb0n/lhHO0jiLk0i7qal X-Received: by 2002:a17:906:3009:: with SMTP id 9mr7341077ejz.220.1593611246015; Wed, 01 Jul 2020 06:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593611246; cv=none; d=google.com; s=arc-20160816; b=Yu3vXCfDgifKyW8f95b+JGX8iNHwoDET6++H/2QTXOc4wdRT0EdRaGiv5GCnczibuI XuKwn4+EgaAxEgciPZ/4Nqj/8vWWDlkAsTC0KOQMK1De8sFJ3iqFZicPtbHQPgurcR+/ 55KCe3CNeoQaXalrzwQL1Qeph1nB/AmCOcpXmSOQoQAN0EFJDtodpRHrg1z0ECrcr1Xb hP9caVZuy4kBLk2HEOr7wnQtYVBQ5d/MM6HO1LHhZJHU9Mf69YwFHvw4+TRcWa4rfDqY 4lcXjX26zW72WshC8qxytIHwW4l6zrIlCgb9e0UoHvrE1K77t8n2L61xUE15ZzFpc1go OA4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=om64jDu9TFu8URAa9SBBr8cC4wjdp+QLHBvJRoX56c0=; b=GHPNsL0aR33cBUU0e9mMKJJhGwFr3Vd4zS+umG747dAlz2+zMQ8rDLxw9BhoI9QzyG OyQFhNoz954wLQqKNtvPWZL+oDatpRjV8WhDuFMkLNSm4Hb+GwElnkd2xQKZwPQI69YX 8MK7PiUFU6xUFeBO5lJGsEeWtNkIt/3NM5d78+p9wMzM5mZbujAVKj6pS10/gTjjHWb1 TQO7Ke851IlVXFJGDMSj9VuhElKayNo802bVbJ4QAdB+6wDTPZM8ErsDXO9zWZ8Iqa7r UMTjIsrHRfhcUfRnwzOr0lA1LM4Q6dYF5zH0puWa2auyO8OqOySV42LNFDP2VM4JhY8P 0Ikw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ob20si3877524ejb.646.2020.07.01.06.47.02; Wed, 01 Jul 2020 06:47:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731256AbgGANqn (ORCPT + 99 others); Wed, 1 Jul 2020 09:46:43 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46169 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731101AbgGANqj (ORCPT ); Wed, 1 Jul 2020 09:46:39 -0400 Received: by mail-pg1-f193.google.com with SMTP id d194so8372133pga.13; Wed, 01 Jul 2020 06:46:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=om64jDu9TFu8URAa9SBBr8cC4wjdp+QLHBvJRoX56c0=; b=f7Bckg43mtnqSEM+TfHP3ypEvQuCdziZs6zepVuUoxCtf5mgi+S+HK2Lxbe/twbLaM 5GGvOxfeHIEWyTCam8XTKk7UekEDMA+2WL7lTgxtDLJkXdMmvn73rDFvQuj1CodOYAaR ayPcbVaqqUQf7uVksFjmONLlM2rnE+ElGYPdS4I0usUYaeyFOsUWCMYmMZRK/E3q56rk vYmlxH0mNhql9JeT/6GsJn9mcEBwhpvRQIKiVDLX5Tw2lA/TttZ8qWWc69Hi+x6FX2f+ eWVAavjKvfRTo+72OJEHaitrqnsJY8qof/Lm4+d444TvMZFGm7m5Wkr/jrGCqvqEqp/z herQ== X-Gm-Message-State: AOAM530BbAJRU9jS3aE9fhQlNWW+8oM2Unyv9Z8kv1kQBAVJ1pAGxLov 4MlZruPz/grU8tUWtLSo+K8= X-Received: by 2002:a63:125a:: with SMTP id 26mr20530442pgs.340.1593611197813; Wed, 01 Jul 2020 06:46:37 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id z11sm5802732pfk.46.2020.07.01.06.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 06:46:36 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 69D5F403DC; Wed, 1 Jul 2020 13:46:35 +0000 (UTC) Date: Wed, 1 Jul 2020 13:46:35 +0000 From: Luis Chamberlain To: Christian Borntraeger , Jessica Yu , Tetsuo Handa Cc: Christoph Hellwig , "Eric W. Biederman" , Andrew Morton , ast@kernel.org, axboe@kernel.dk, bfields@fieldses.org, bridge@lists.linux-foundation.org, chainsaw@gentoo.org, christian.brauner@ubuntu.com, chuck.lever@oracle.com, davem@davemloft.net, dhowells@redhat.com, gregkh@linuxfoundation.org, jarkko.sakkinen@linux.intel.com, jmorris@namei.org, josh@joshtriplett.org, keescook@chromium.org, keyrings@vger.kernel.org, kuba@kernel.org, lars.ellenberg@linbit.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, nikolay@cumulusnetworks.com, philipp.reisner@linbit.com, ravenexp@gmail.com, roopa@cumulusnetworks.com, serge@hallyn.com, slyfox@gentoo.org, viro@zeniv.linux.org.uk, yangtiezhu@loongson.cn, netdev@vger.kernel.org, markward@linux.ibm.com, linux-s390 Subject: Re: linux-next: umh: fix processed error when UMH_WAIT_PROC is used seems to break linux bridge on s390x (bisected) Message-ID: <20200701134635.GR4332@42.do-not-panic.com> References: <20200624144311.GA5839@infradead.org> <9e767819-9bbe-2181-521e-4d8ca28ca4f7@de.ibm.com> <20200624160953.GH4332@42.do-not-panic.com> <4e27098e-ac8d-98f0-3a9a-ea25242e24ec@de.ibm.com> <4d8fbcea-a892-3453-091f-d57c03f9aa90@de.ibm.com> <1263e370-7cee-24d8-b98c-117bf7c90a83@de.ibm.com> <20200626025410.GJ4332@42.do-not-panic.com> <20200630175704.GO13911@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 01, 2020 at 12:08:11PM +0200, Christian Borntraeger wrote: > dmesg attached > [ 14.438482] virbr0: port 1(virbr0-nic) entered blocking state > [ 14.438485] virbr0: port 1(virbr0-nic) entered disabled state > [ 14.438635] device virbr0-nic entered promiscuous mode > [ 14.439654] umh: sub_info->path: /sbin/bridge-stp > [ 14.439656] /sbin/bridge-stp > [ 14.439656] virbr0 > [ 14.439656] start OK so what we seem to want to debug is the umh call for: /sbin/bridge-stp virbr0 start > [ 14.439734] == ret: 00 > [ 14.439735] == KWIFEXITED(ret): 01 > [ 14.439736] KWEXITSTATUS(ret): 0 Its not clear if this is the respective return value, but now that we have a clue that this is the the only non-modprobe call, we should have a clearer certainty that this is the issue. Indeed my patch "umh: fix processed error when UMH_WAIT_PROC is used" did modify bridge-stp in the following way: diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index ba55851fe132..bdd94b45396b 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -133,14 +133,8 @@ static int br_stp_call_user(struct net_bridge *br, char *arg) /* call userspace STP and report program errors */ rc = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC); - if (rc > 0) { - if (rc & 0xff) - br_debug(br, BR_STP_PROG " received signal %d\n", - rc & 0x7f); - else - br_debug(br, BR_STP_PROG " exited with code %d\n", - (rc >> 8) & 0xff); - } + if (rc != 0) + br_debug(br, BR_STP_PROG " failed with exit code %d\n", rc); return rc; } If you look at this carefully though you'll notice that the change just modifies *when* we issue the debug print. The more important relevant part of the patch however was that we now do return a correct error value when the call fails. More importantly, depending on if an error or not we run the kernel STP or userspace STP later: static void br_stp_start(struct net_bridge *br) { int err = -ENOENT; if (net_eq(dev_net(br->dev), &init_net)) err = br_stp_call_user(br, "start"); if (err && err != -ENOENT) br_err(br, "failed to start userspace STP (%d)\n", err); spin_lock_bh(&br->lock); if (br->bridge_forward_delay < BR_MIN_FORWARD_DELAY) __br_set_forward_delay(br, BR_MIN_FORWARD_DELAY); else if (br->bridge_forward_delay > BR_MAX_FORWARD_DELAY) __br_set_forward_delay(br, BR_MAX_FORWARD_DELAY); ---------------------> can you enable debug print for this to see what ---------------------> you end up using? if (!err) { br->stp_enabled = BR_USER_STP; br_debug(br, "userspace STP started\n"); } else { br->stp_enabled = BR_KERNEL_STP; br_debug(br, "using kernel STP\n"); /* To start timers on any ports left in blocking */ if (br->dev->flags & IFF_UP) mod_timer(&br->hello_timer, jiffies + br->hello_time); br_port_state_selection(br); } -----------------> spin_unlock_bh(&br->lock); }