Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1188828ybn; Wed, 2 Oct 2019 12:10:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqym95wjKFXvnzYXRg9+zRbGSMamq06CV3OrUYiFYVwFwvfdzLpUTt/gZDxw5NC8rS6V+qWd X-Received: by 2002:a50:9384:: with SMTP id o4mr5568719eda.8.1570043410573; Wed, 02 Oct 2019 12:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043410; cv=none; d=google.com; s=arc-20160816; b=GKjoLHdAsH5LNAVxF4xoKISIyLunorZpQItaAALy6rEclArzT5qDERf0SLXKO6MCPZ rqmoWA+qwOGPk9oq57V3ufDJiueIRIzifk81wGOWnftaRkHhJ49uWO0k4GlRs1km1lXp ye1QNEZr9QWzawIPvYJYyybS86TrM8jbAKjwusM1CRTvUo767EOUdrae8Og75w/0s3vF n9WffPtKiGWW0NWiXt6bxzAIxaVkxKE6bz30vkeLZ8nGI/IOHNoIyrhpblAypm//s1lt HPk8HvSsRlY1HfzG4GoGNpMLCgaiGafojwFg6p7zjmB/RqBCkFUaFAZ7bYpK3RFYNJPc a0yg== 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:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=OlwdoHqGBJsE9I3YucsLou1lzFiPFTjZF9LkTXdeHFo=; b=ka07eBnE4MWgUHqKS+ZNSSqttY+L5EndCETgm7zUkblLZr3D7NsJ0pcswy/ruKIcSg zVGud109J2bbD0yzyMgpFoLxABk5JnJsnrKjeeGZEzmZY9OPcmcANJDhSGQoIIJ2cIWJ AzLAwIVoXovi/8NJUASYOqUbsc6tRSMnWjcQL5yeGF+dhxnyracWtc3FdA6WndnwD+CQ 79m4PIuOAbIVjc4MfF9gyAeSRiuJ0TFVV/ddY0AUrXdhZx03p+M2IcOOAwuK0KVUnqcl aVBSSkEfJwa9n2ecL0o4LTPVnBqRF1BpbrTLU7NGEAsrJ5xd5ieoDelyttpBd2T/1COr svIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si18963edd.269.2019.10.02.12.09.46; Wed, 02 Oct 2019 12:10:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729425AbfJBTIZ (ORCPT + 99 others); Wed, 2 Oct 2019 15:08:25 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35574 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726669AbfJBTIL (ORCPT ); Wed, 2 Oct 2019 15:08:11 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyr-00035t-2v; Wed, 02 Oct 2019 20:08:09 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyo-0003dN-9v; Wed, 02 Oct 2019 20:08:06 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Alexandra Winter" , "David S. Miller" , "Julian Wiedmann" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 44/87] s390/qeth: fix VLAN attribute in bridge_hostnotify udev event In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Alexandra Winter commit 335726195e460cb6b3f795b695bfd31f0ea70ef0 upstream. Enabling sysfs attribute bridge_hostnotify triggers a series of udev events for the MAC addresses of all currently connected peers. In case no VLAN is set for a peer, the device reports the corresponding MAC addresses with VLAN ID 4096. This currently results in attribute VLAN=4096 for all non-VLAN interfaces in the initial series of events after host-notify is enabled. Instead, no VLAN attribute should be reported in the udev event for non-VLAN interfaces. Only the initial events face this issue. For dynamic changes that are reported later, the device uses a validity flag. This also changes the code so that it now sets the VLAN attribute for MAC addresses with VID 0. On Linux, no qeth interface will ever be registered with VID 0: Linux kernel registers VID 0 on all network interfaces initially, but qeth will drop .ndo_vlan_rx_add_vid for VID 0. Peers with other OSs could register MACs with VID 0. Fixes: 9f48b9db9a22 ("qeth: bridgeport support - address notifications") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/s390/net/qeth_l2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1956,7 +1956,7 @@ static void qeth_bridgeport_an_set_cb(vo l2entry = (struct qdio_brinfo_entry_l2 *)entry; code = IPA_ADDR_CHANGE_CODE_MACADDR; - if (l2entry->addr_lnid.lnid) + if (l2entry->addr_lnid.lnid < VLAN_N_VID) code |= IPA_ADDR_CHANGE_CODE_VLANID; qeth_bridge_emit_host_event(card, anev_reg_unreg, code, (struct net_if_token *)&l2entry->nit,