Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2996927AbdDZJYf (ORCPT ); Wed, 26 Apr 2017 05:24:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40506 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1435063AbdDZJDm (ORCPT ); Wed, 26 Apr 2017 05:03:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4EE736032C 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: [1/1] libertas: check return value of alloc_workqueue From: Kalle Valo In-Reply-To: <1492953578-387-1-git-send-email-bianpan201603@163.com> References: <1492953578-387-1-git-send-email-bianpan201603@163.com> To: Pan Bian Cc: Bhaktipriya Shridhar , Tejun Heo , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pan Bian User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20170426090341.582A46148E@smtp.codeaurora.org> Date: Wed, 26 Apr 2017 09:03:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 663 Lines: 18 Pan Bian wrote: > From: Pan Bian > > Function alloc_workqueue() will return a NULL pointer if there is no > enough memory, and its return value should be validated before using. > However, in function if_spi_probe(), its return value is not checked. > This may result in a NULL dereference bug. This patch fixes the bug. > > Signed-off-by: Pan Bian Patch applied to wireless-drivers-next.git, thanks. dc3f89c38a84 libertas: check return value of alloc_workqueue -- https://patchwork.kernel.org/patch/9694827/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches