Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2468693pxb; Mon, 19 Apr 2021 06:30:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygT/fziGT/R2kZAWn5RuPHjHWdAGOcBf2hqj+giWrf6a9nFx9q0Y6+5xURsZdsnCiQelnt X-Received: by 2002:a17:906:278e:: with SMTP id j14mr22129052ejc.224.1618839055181; Mon, 19 Apr 2021 06:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618839055; cv=none; d=google.com; s=arc-20160816; b=k30wK3lcYZcI83287kj5qJ2+zb5jZYPK8QeJRQMj49aznSqdS3g5CYV9r1pSJYiKD7 yFVa3mt45Oy3B3p+hzR3ahd3vBy8OnfYNAt4+Bc3TC+RGhNwVgZc9hWaJW7XAmSJ/Cwf X25XW5Pd08zHoPed2bNpdRyIjlmO8NtCft4j7Xn/jmAmvowIobG1aeqPQ04vCQsC8nwa LClpPtwaBV+vbJ09LNGRaQ76xBWk6puaE+qgzGswhD0gLuVrBtCS7xx4EEd0zjXfxV1F 1mP2Nrm7gCdMG3c6njEsypPFvKkH5eCeVYgHdJs/pNgmswpoYbyVOnq64mZVO9txBA3t FzHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yQBMjRufAX9QgislUbHM+4Q+w57IOVfbKrhsDazMWYI=; b=mibHgOKvFOEmpOi79t+OU5xmnLV+S0I+CVSjBpblag5icQR8CG4yW7mH7NuA1ep9YV S7C9K+8obo2CG7CddGWVtEIdp0Z2k2kbe3vjxkkfajxFAtc/Bg52l3Loh5yy4Z4F99Hb NTKsl0obW/yXpftjlcps/5MUpdENH6px9M373N/28SAwQF0A9dKeV8DOw93puBoEa698 LrDM9uDEgnQyS2v4cNLYU4JSgY16DbWqAW3eVJ9H1Kcu6Sci9TBWvEk8Sw6svl+e0410 HyKGjgoMHpBjQhklKWoUw/PLAyGfUKEeb9Y5Tneu8tCLYHsVxWzBMWficWQ60wMc/snF y9dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HCTiYBIC; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si12012257ejo.657.2021.04.19.06.30.30; Mon, 19 Apr 2021 06:30:55 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HCTiYBIC; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242193AbhDSNZ1 (ORCPT + 99 others); Mon, 19 Apr 2021 09:25:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:55434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240828AbhDSNTJ (ORCPT ); Mon, 19 Apr 2021 09:19:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 606DC613E6; Mon, 19 Apr 2021 13:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838110; bh=th2sy2QPFiBQ72aTkzx7P+bfQPfiypMTkB/214gxSkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCTiYBICZAIuyv64wRU7t8Jh0JN3he/VIgNHoACGhFl2uFE7IAsTxUOZ0AL7dldFE mog0DMm8Q9rzRatKgMNCJckmRKpF14jodrLyjGpDgtKdLMQvlZ+lNflXxA+x74/9F3 yYXYC+swWRvasW/9Tv/eTMZBh8Up8kWPTmyj6csE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Aring , Stefan Schmidt , Sasha Levin Subject: [PATCH 5.10 039/103] net: ieee802154: stop dump llsec seclevels for monitors Date: Mon, 19 Apr 2021 15:05:50 +0200 Message-Id: <20210419130529.147132326@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Aring [ Upstream commit 4c9b4f55ad1f5a4b6206ac4ea58f273126d21925 ] This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring Link: https://lore.kernel.org/r/20210405003054.256017-13-aahringo@redhat.com Signed-off-by: Stefan Schmidt Signed-off-by: Sasha Levin --- net/ieee802154/nl802154.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index 87dac717d197..10fc37e45e2b 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c @@ -2031,6 +2031,11 @@ nl802154_dump_llsec_seclevel(struct sk_buff *skb, struct netlink_callback *cb) if (err) return err; + if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) { + err = skb->len; + goto out_err; + } + if (!wpan_dev->netdev) { err = -EINVAL; goto out_err; -- 2.30.2