Message ID | 20200128135818.138777535@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=oJ2n=3R=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3B11C2D0DB for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:48:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C3042173E for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580222936; bh=GblreWZ+JRtAI9Ywunt0o62CX5WRB6D8ta66N+lyYlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nMZ1rC41O+Pd9OwzblaeJ6c6wOGtGu9gSF60AHFYa+oAq2AmB6T+BOf+GNKE0oD75 FpOIxbzl0qQTeEXpvSsiww2JpHT2f7fM1H8+Mq+4PTFmxXXA1i5ki9JJIU6pgQEMlj U5W8jVASTUp3oe7NBuHJwhk/zvj5sVK9+OY3frXc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbgA1OCA (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 28 Jan 2020 09:02:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:48132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbgA1OB5 (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 28 Jan 2020 09:01:57 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6252624685; Tue, 28 Jan 2020 14:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220116; bh=GblreWZ+JRtAI9Ywunt0o62CX5WRB6D8ta66N+lyYlQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r+3Fxzq+ra9s2sFdiIK8qNHJEyo7x3IxkB8uVj1eO0BfvZnex2aXIEA/0NUnJEjlp k3QNdc4pdPjuL49r0cbOiOWWwx9FpAd7s/zDfvsNU5mmJYW6rV4IXGfUC3ULQf9ZLK nVEFXvo0Lz4BWcas9rV3l6KLa5bP8eXYx0buPrME= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Ilja Van Sprundel <ivansprundel@ioactive.com>, Michael Ellerman <mpe@ellerman.id.au>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH 5.4 006/104] net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM Date: Tue, 28 Jan 2020 14:59:27 +0100 Message-Id: <20200128135818.138777535@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135817.238524998@linuxfoundation.org> References: <20200128135817.238524998@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c @@ -2448,6 +2448,8 @@ static int cxgb_extension_ioctl(struct n if (!is_offload(adapter)) return -EOPNOTSUPP; + if (!capable(CAP_NET_ADMIN)) + return -EPERM; if (!(adapter->flags & FULL_INIT_DONE)) return -EIO; /* need the memory controllers */ if (copy_from_user(&t, useraddr, sizeof(t)))