From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham 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 64F7AC4360F for ; Thu, 4 Apr 2019 12:42:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E9E7206B7 for ; Thu, 4 Apr 2019 12:42:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729793AbfDDMmx (ORCPT ); Thu, 4 Apr 2019 08:42:53 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37145 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728858AbfDDMmx (ORCPT ); Thu, 4 Apr 2019 08:42:53 -0400 Received: by mail-lj1-f194.google.com with SMTP id v13so1955661ljk.4 for ; Thu, 04 Apr 2019 05:42:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/ORTWD5TSRs1UDcuHJV7JNsc0pfm9xT1ZBMIQpN5Nxw=; b=D4i6vPEolVlFSQyAYX7/BZLC5eozanj4L1UBBXazXtTJUgcsx9etCLnHhALyzbJLRA j4Ez0WjuyquZiH+1QzWfY7N6jbkfoWAJM1XWzzyv1nnYNNahGt+G3bkfippfAd2sg8rC Pjwo1t+NMRo5PvA90CVkpNvDVVKaJVC4ZsJhM1EcepsZ2+/ZE1xR3txeEpqzM9+V9WVo j1zAzVcMcMOxqBnBS6q4R4q66aNB11gDoc3Jq0E9qXTxzRqZI6DPejsxubFolZ3dGY2N TM7SmadNs/GzsbnSkoEkot64el3iZuVPBrmuBgnVrnubMfsSg9CmUI8oPVNdqc4Id8md AsBQ== X-Gm-Message-State: APjAAAU6PjfLx9QPvD7JsraHstpggdkcqCwiaNKLUYL2D1MV/S91dz7J 1xBWNOhQ+J5WghwGxNyEbZfyjZA6CHCiXBfeZThFrw== X-Google-Smtp-Source: APXvYqxnY0hbY71x35eZ4H+s/uKWY52kGOhIpajGHTAb3rkT/fvGL0UzwxgPGSLNmRu6fDekh3cfi7qDxqIoSEUBPGA= X-Received: by 2002:a2e:1245:: with SMTP id t66mr3405353lje.18.1554381771162; Thu, 04 Apr 2019 05:42:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Matteo Croce Date: Thu, 4 Apr 2019 14:42:15 +0200 Message-ID: Subject: Re: [PATCH net] net: thunderx: fix NULL pointer dereference in nicvf_open/nicvf_stop To: Lorenzo Bianconi Cc: "David S . Miller" , netdev , vlomovtsev@marvell.com Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Apr 4, 2019 at 12:16 PM Lorenzo Bianconi wrote: > > When a bpf program is uploaded, the driver computes the number of > xdp tx queues resulting in the allocation of additional qsets. > Starting from commit '2ecbe4f4a027 ("net: thunderx: replace global > nicvf_rx_mode_wq work queue for all VFs to private for each of them")' > the driver runs link state polling for each VF resulting in the > following NULL pointer dereference: > > Fixes: 2ecbe4f4a027 ("net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them") > Fixes: 2c632ad8bc74 ("net: thunderx: move link state polling function to VF") > Reported-by: Matteo Croce > Signed-off-by: Lorenzo Bianconi > root@thunderx:~# uname -r 5.1.0-rc3+ root@thunderx:~# ip -d link show dev enP2p1s0v0 2: enP2p1s0v0: mtu 1500 xdp qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 1c:1b:0d:0d:52:a4 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode none numtxqueues 48 numrxqueues 48 gso_max_size 65536 gso_max_segs 65535 prog/xdp id 2 tag 444c1e2fd143efc0 jited Tested-by: Matteo Croce -- Matteo Croce per aspera ad upstream