Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp193181imp; Wed, 20 Feb 2019 17:30:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZbWKoc/sHHJ5FNJfj5RAsnSIQhLgVa9YLCwt0nBOKbpmxgpfxT4UYsmwmXLHMRpn0EEBcz X-Received: by 2002:a17:902:820f:: with SMTP id x15mr38557366pln.224.1550712629024; Wed, 20 Feb 2019 17:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550712629; cv=none; d=google.com; s=arc-20160816; b=bTINE+PjVj8pTP2Aid6JI0HLARHk92/H3J9U19FgDKIigDWqoIAOwCI2VJ5EsrSYx2 YZdk9Y3rY7nApWAQXRc9RzONCV9RQqRsG8Z7/Zx+XdsgtiL7nyWtbiPOtTSwrkSoOxgh dBMEvFEwgSVd7py9oQLphHtyorUoeA4Ec7jJ6U9p72lB0TbmTtDLSJaogPE7wf3AMvrF Gc3KcgXm2mtOobHIFGG4lIsvIcnH8f92UrlX+MpeLP5/SELirsPcx5RvPkq/MQuWRjaD Z83VhDiqMGH7YthOJoBgFAIldtAVlCv7E9llQc5WAlaQgSoG5TEYRyqdOSiOEvd+IXcV fzqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4HZgtpsrSs4fFKQmQiJSvo6NH/0dfEr00uqHpZ4RjLc=; b=xYODViBmeOyxxhpce+Oz0wj+tfWkowMDPKbE3wBQnjPeppXSoSnrdY/Ykbcw9rEeTk f9bsFhlkI/+LoKeZmOwa475eKEmwjyp61UC7meDp1S0uFM+RKU786V3s2TKw1VsqZ+YX 4uS4By/IYuAmpcmuPyJKuViFqSjaXLXFYkDmlkKAzz4/1epWxeaOGx7NVciufX7VI/By KImhF0+bGk1w2QZZP+BOzG02bT4Psb91aUfpJZSe9M8nDXxxZ6S+TP03Xk+NahnmhGI0 XCjPOLiPTfWq8nlmwluyjEciaq89pv2xfnFFFBQEknU9SmCrBGKNwI17NP0B18XcryUc qV2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UXsH13Ky; 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 p74si19753947pfa.279.2019.02.20.17.30.12; Wed, 20 Feb 2019 17:30:29 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UXsH13Ky; 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 S1726618AbfBUB3u (ORCPT + 99 others); Wed, 20 Feb 2019 20:29:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:38960 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbfBUB3u (ORCPT ); Wed, 20 Feb 2019 20:29:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4HZgtpsrSs4fFKQmQiJSvo6NH/0dfEr00uqHpZ4RjLc=; b=UXsH13KyaXt6Z6tttgx7v5ZFn gbY0aTdOq0CcvHthhM9f6lCWrX2B9GC9NDaHGk+bvlW539EjG/3NPcB1zpRRNpIKXbDCsUAf6v2pZ 3kGvTct28qXMTNMqHLCmKU/0J66KVDUeCwB0yTsDB7D4jqdYwgcTQCCyZsNkZA4kYMC6B2p9XxkjA VB+BsMDj7O8V8sAou7L1VXxtGLtHQQ/IFI2TI8caal1apqvCFTLoD/KA4L7yTDqnySchS8ELAgoRy UwEW403bqNe4KOhbWs/shEe2XSMK87FEtYvucX6z1UbzrzICbjF8JeQcz1mc9X+Wbr0rCmOnjauQA ESZarMRkQ==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwdBN-0002Oq-3F; Thu, 21 Feb 2019 01:29:49 +0000 Date: Wed, 20 Feb 2019 17:29:47 -0800 From: Darren Hart To: Andy Shevchenko Cc: Mattias Jacobsson <2pi@mok.nu>, Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Subject: Re: [PATCH v2] platform/x86: wmi: fix potential null pointer dereference Message-ID: <20190221012947.GD5838@wrath> References: <20190130151424.28140-1-2pi@mok.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 05:43:34PM +0200, Andy Shevchenko wrote: > On Wed, Jan 30, 2019 at 5:15 PM Mattias Jacobsson <2pi@mok.nu> wrote: > > > > In the function wmi_dev_match() the variable id is dereferenced without > > first performing a NULL check. The variable can for example be NULL if > > a WMI driver is registered without specifying the id_table field in > > struct wmi_driver. > > > > Add a NULL check and return that the driver can't handle the device if > > the variable is NULL. > > > > Good for me, thanks! Queued for testing, thanks Mattias. -- Darren Hart VMware Open Source Technology Center