From patchwork Wed May 16 08:48:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10403103 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB682601F9 for ; Wed, 16 May 2018 08:49:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A2FA28803 for ; Wed, 16 May 2018 08:49:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C88628813; Wed, 16 May 2018 08:49:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0844728803 for ; Wed, 16 May 2018 08:49:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbeEPItC (ORCPT ); Wed, 16 May 2018 04:49:02 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45020 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbeEPIs5 (ORCPT ); Wed, 16 May 2018 04:48:57 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4G8kCDK147771; Wed, 16 May 2018 08:48:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=a65Rn7zWA5NCOz2XRzKzybdizO2YI/B83HQUIDJPplc=; b=Vpi+JOVy9tllsODeEsK196ivLAZMMME582AC9EJxCyFoJ8DAugee68PMN6ddXRTvAafs kPMIdjhoW4/3qs+l95hI2pg/lwBWkBUA4VIR3wyFSUAoDeZz6XYRsZXLExO5Zo2SNhPH Q7IPS7haCjcbbtbMCwCh0O5LP0Ts6j5ss6YakjH+7DnklTNL7zyy0ABd8+wS+BLWlyHF QEU5NU0HQl//oiLjnTqMqe50EytYkn0r7/bAQdVtibaUrABIRy97pHBrZNKXin1q0fZc 4JcmXsdJ35b5UDac5NrnivtYhufNQ7lB5y03OtwVRayuHYE9EKLhh18/v2qgd6FWs+J0 kw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2hx29wbuyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 08:48:44 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4G8miu3004824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 08:48:44 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4G8mhCG020285; Wed, 16 May 2018 08:48:43 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 16 May 2018 01:48:43 -0700 Date: Wed, 16 May 2018 11:48:37 +0300 From: Dan Carpenter To: Johannes Berg , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo() Message-ID: <20180516084836.GB23043@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8894 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=851 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805160089 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Smatch complains that we should use the passed in "gfp" instead of hard coding GFP_KERNEL. I looked at some of the callers and this would probably be a bug for rtw_cfg80211_indicate_sta_disassoc() which uses GFP_ATOMIC and a NULL "sinfo". Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace") Signed-off-by: Dan Carpenter Acked-by: Toke Høiland-Jørgensen diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index afbe5105bf7f..3eb645b81777 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -14644,7 +14644,7 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr, struct station_info *empty_sinfo = NULL; if (!sinfo) { - empty_sinfo = kzalloc(sizeof(*empty_sinfo), GFP_KERNEL); + empty_sinfo = kzalloc(sizeof(*empty_sinfo), gfp); if (!empty_sinfo) return; sinfo = empty_sinfo;