Received: by 10.213.65.68 with SMTP id h4csp3983111imn; Tue, 10 Apr 2018 07:33:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/aukF3rTum6lLaBIcFnW/HOjga0Xy+WjsEn4c7nVMjzSpn5v+6F6QiWgtl4fxB8+Lp8WB4 X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr715186pla.324.1523370808884; Tue, 10 Apr 2018 07:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523370808; cv=none; d=google.com; s=arc-20160816; b=ndoPh7RwStwwnsQFoSaOZ9dhBu6IzW0HEK7k7vBJbnHEMMukeSdvzkNglkERcfxxwV bZN3n/FD2zjxSJS2BdFmh20coKathPxGCFcLcAfPOw48iULKxwGm/s7H8q7d3vpLsw/d 79c7AUx2EXsw/Nql+6QH1j8Nzo3X45kE5WBxergFHT9voCVYfYmIjuv1ALvjaFMGxIHN lFtJYYfz5DxmRRHKPCRgo+XhebasKQ7/aFUIrwFULrw3NdtraXAmplZ+RZYPecVaL1QX Cy3LnPAieRn1jfgZvKpiviXLkcmYbiWIk/57JlGmLYZvG37qnIoJNHsxLDoMp9oRozs+ kzCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=sWyhWW4+2bUizIsth3M4VvQkcIkTI9Ig7TjcA9sDLWs=; b=C5uXAhUyLrf5UjMO38XBjCJI5kBhZcFZA0IknDEuoF+zoWMs817/iXX3tqIpHoJtXh W3xm640rDJGIP6RFICEA8tJ071Z9NcEA6fleE3FCLkQdXvEw5EHQ84zcEtaoc/Js6RaX OdqGfMiTuCDp/aeNPm7HlzlfiHBZ8vpfXXCgytU9zOi4SIKdtCy3DbhW+DQKKQV1A01T O2WOsMK7et2RBpaK26zxGzjuvG3L911P4AqvtrNzc1KZmwth7qQVfboFihxl7f5mg62g uK1Sxou6LFI61QOLaDHxyLra8tMn0/daAcbQpwQL+2OBZS5udDrIFYwRRZVjpq1Fjp5n UCeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=IaaXIocJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=TABmcZ2A; 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 g4si2183420pfm.358.2018.04.10.07.32.51; Tue, 10 Apr 2018 07:33:28 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=IaaXIocJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=TABmcZ2A; 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 S1754042AbeDJOaG (ORCPT + 99 others); Tue, 10 Apr 2018 10:30:06 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43614 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbeDJOaE (ORCPT ); Tue, 10 Apr 2018 10:30:04 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A40E460AFB; Tue, 10 Apr 2018 14:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523370603; bh=j7tXFIdRV3UiTwvtM5WVxHy0LvUpCDcWnXzUgUtYOqg=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=IaaXIocJ2gUEh5Q9Y4PAOa5alhYa3+bpUgeHU+3LUv9ytBKEAdgwmDVmMLQGXigxF CfqxWfyPwoszXSL/ufz8g+zJux2YrK2vc/LXhUwAuXGTkBK0LgxNk9sUSM3HbgWFXD vlIJZL5pLKdUJvhtVsirWB/XvOSf5Ko9wM9Ze7sk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,MISSING_DATE,MISSING_MID,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-52.elisa-laajakaista.fi [88.114.240.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 759036014B; Tue, 10 Apr 2018 14:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523370603; bh=j7tXFIdRV3UiTwvtM5WVxHy0LvUpCDcWnXzUgUtYOqg=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=TABmcZ2AJhHWOVtY+4vITKVWUmuleh0XhqwR2O3TwHwD7WitHhkiwHwvV/uHYix5q r/viR5Sqr24CBFl6C/8Io08I22u2ZMoyscM4Zdu9lisn6kU3i2W4t6n/TKr7B+Eb41 pw2Gm5YJLw9AQ2f6voNXV+IYgFj4ZIdNvdhJ9UMg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 759036014B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [next] wil6210: fix potential null dereference of ndev before null check From: Kalle Valo In-Reply-To: <20180328174027.31551-1-colin.king@canonical.com> References: <20180328174027.31551-1-colin.king@canonical.com> To: Colin Ian King Cc: Maya Erez , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20180410143003.A40E460AFB@smtp.codeaurora.org> Date: Tue, 10 Apr 2018 14:30:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin Ian King wrote: > The pointer ndev is being dereferenced before it is being null checked, > hence there is a potential null pointer deference. Fix this by only > dereferencing ndev after it has been null checked > > Detected by CoverityScan, CID#1467010 ("Dereference before null check") > > Fixes: e00243fab84b ("wil6210: infrastructure for multiple virtual interfaces") > Signed-off-by: Colin Ian King > Reviewed-by: Maya Erez > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. db5a4d5e1073 wil6210: fix potential null dereference of ndev before null check -- https://patchwork.kernel.org/patch/10313705/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches