Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2385185pxj; Sun, 6 Jun 2021 00:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx3Hv8Nka5y03SkESpP2Z+Ocyse5D5x5CAfTgqD/WxrkPQVC3De0sBLGFguqY6fFncCyHZ X-Received: by 2002:a17:906:f117:: with SMTP id gv23mr12740573ejb.432.1622963794292; Sun, 06 Jun 2021 00:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622963794; cv=none; d=google.com; s=arc-20160816; b=O4e+NkPVL7KGSErw06VelL1YbxSP43ooekng2Zsf0zBLBCn7Ym7CSnPsFGPsZy/L7v cP+oMCDf/EHAw8vE64+CsTi5mZH27zrJ614e7ZUpZeJ2FzHxG2rxOK9BMi6g454bBuy9 a87V9Ab4t5n9Ru0tFbB6ZR6ij+jPlqeECmZ4us+fMA1/X3eJPF3/NI9IH3S4drG8YdH0 Awkxa+N6uBKLohWvp2yamD2wzPUXf7f4fj9cK8h/b37JmyZGvMcyIvkmqZVFsqHc0GBe 12Gpai+sLESuVLMMXhWm0I0IZBR5Lw5KA+cevRMgzi08FHMUbBVa4XyrdkxAWSECO9kO QDew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DZJ8uHZpUjrs1twuEZRn1dylY0dtMIOsd1q6ILWDlkw=; b=jEnY6h7TakDez/fAmuy7hMnCQR14aoVChxKEgR/1IlpMp2PJ1+R3FcwkMDoKW/q430 2U8Z1QLNTMP911KOPNOJeWGFx80KbEd+OI/x+GpvUrUc6HcFlzxWND3VfkOIGTA/ItTb YlfNWDWGaF00RmRR4tOWVTu+rteIZPbIDO9SYtrle/hou+iKnpzdV2Wj1zHlxpsik22a qnlli75oaEA7+ffiFboqOJ6tqDd8iCpkcj2FQluEfQT63oxJJbathEGVYEJqXlzBKo+Y NGdMY5Y2hY1C3Nn1Nhsc4tOeMpMdOJO+ghA3BA9EtvRH8EJC+HDLKTJpIMWSzvxgMqUz gztg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TXnJZroJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 26si9561083ejk.419.2021.06.06.00.16.11; Sun, 06 Jun 2021 00:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TXnJZroJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbhFFHPp (ORCPT + 99 others); Sun, 6 Jun 2021 03:15:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:57688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbhFFHPp (ORCPT ); Sun, 6 Jun 2021 03:15:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAAA5611ED; Sun, 6 Jun 2021 07:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622963620; bh=kKgXqMKBbdsOTgX+oRuQSkCNMTlozOMRdBF9GdCe0Hg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TXnJZroJEikwRaj2EjCXxM6FL0JA5dAOcoFuuVzVZUQ1uHDYIWpV/TQmvV4vJET+B N1vijX9LU8JBq1fp3Lsbbmp2jUvxgMlvMQPFdsEtwWKDj5dRqQLix6S2/CAS3OXoff G3nP4obr0z/Krs7QXTEBUAiTmXFcK+kobD7PxoFU= Date: Sun, 6 Jun 2021 09:13:37 +0200 From: Greg Kroah-Hartman To: Wenli Looi Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: Fix uninitialized variable Message-ID: References: <20210606070021.116284-1-wlooi@ucalgary.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210606070021.116284-1-wlooi@ucalgary.ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 06, 2021 at 12:00:21AM -0700, Wenli Looi wrote: > Uninitialized struct with invalid pointer causes BUG and prevents access > point from working. Access point works once I apply this patch. > > https://forum.armbian.com/topic/14727-wifi-ap-kernel-bug-in-kernel-5444/ > has more details. > > Signed-off-by: Wenli Looi > --- > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > index 2fb80b6eb..7308e1185 100644 > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > @@ -2384,7 +2384,7 @@ void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame, > DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); > > { > - struct station_info sinfo; > + struct station_info sinfo = {}; What caused this bug to show up? Did it happen from some other commit? Are you sure that all of the fields are being cleared properly here, what about any "holes" in the structure? thanks, greg k-h