From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Cyrus-Session-Id: sloti22d1t05-3303463-1521214720-2-2488330548292278774 X-Sieve: CMU Sieve 3.0 X-Spam-known-sender: no X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HEADER_FROM_DIFFERENT_DOMAINS 0.25, ME_NOAUTH 0.01, RCVD_IN_DNSWL_HI -5, T_RP_MATCHES_RCVD -0.01, LANGUAGES en, BAYES_USED global, SA_VERSION 3.4.0 X-Spam-source: IP='209.132.180.67', Host='vger.kernel.org', Country='CN', FromHeader='org', MailFrom='org' X-Spam-charsets: plain='UTF-8' X-Resolved-to: greg@kroah.com X-Delivered-to: greg@kroah.com X-Mail-from: stable-owner@vger.kernel.org ARC-Seal: i=1; a=rsa-sha256; cv=none; d=messagingengine.com; s=arctest; t=1521214719; b=Hrx9job043p4/euZcuZbGP8grG6II66SA534c95fSA6wpfl dEQIrr7i+cE6wce2aTeSHM3u3d1jYBSGQW+0Ov9KLztkEoVbE54DPsweheCG7X1T POmmh3q8ikxOaY++TanJz+CnIm/Msxlul/SynXqkz4UXvD2VAlKkfsmbpA+zA5yH t8poFsRmxtIdcXOVIe+/PyRaRI8LYNFdkK24AlQZV5KoITKSbSs0SZmyB/J3eEC6 Qzm1E/o3HqKeYiBAPgDnBigywRRjy9JoP1AJxL6juZZKq+5fhYfEAxam1ZMEa39l raiJDqZUukSGxxak5042vYAPefLwtY57vP6KLpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender :list-id; s=arctest; t=1521214719; bh=7t1u8rWtuVjoO9T4APyoUnsG3u LDUsFjuiGHxld0TP4=; b=sfVKOk2Dx1miWklHHGnxOisTVpCkEV+PJMSeGEB8Y/ cQPsVduhTJHssKS+tFBqjY+YA7zwT4rKZ4WwaU9Y3KynRihyIquPopexTGIHARrF X9D68aS5Cm6a3a2DwRw1nxlQOA7ZLlU/aQ2s6+BZLCaJTz2v4imHt4x78d4XYHns UKXpVW7pcBtJTX+MigeDQnoLyTEeU0ZRSXCGPAWRsX52HM6iw18czdGnMtMEdLs4 7S1kwPgraqfB5h8l3IiUj5ZAvXVbBWoFx75ufDzJ3CjbBwoxwjWYZspRrt042mo9 lofIh4j9g+Ti6yx7Fr/YfqvSEc2z8ujYscag+dDclnJw== ARC-Authentication-Results: i=1; mx3.messagingengine.com; arc=none (no signatures found); dkim=none (no signatures found); dmarc=none (p=none,has-list-id=yes,d=none) header.from=linuxfoundation.org; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=stable-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-category=clean score=-100 state=0; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=linuxfoundation.org header.result=pass header_is_org_domain=yes Authentication-Results: mx3.messagingengine.com; arc=none (no signatures found); dkim=none (no signatures found); dmarc=none (p=none,has-list-id=yes,d=none) header.from=linuxfoundation.org; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=stable-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-category=clean score=-100 state=0; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=linuxfoundation.org header.result=pass header_is_org_domain=yes Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754537AbeCPPiZ (ORCPT ); Fri, 16 Mar 2018 11:38:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42570 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754501AbeCPPiX (ORCPT ); Fri, 16 Mar 2018 11:38:23 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.14 098/109] mac80211: remove BUG() when interface type is invalid Date: Fri, 16 Mar 2018 16:24:07 +0100 Message-Id: <20180316152335.197757024@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org X-Mailing-List: stable@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luca Coelho [ Upstream commit c7976f5272486e4ff406014c4b43e2fa3b70b052 ] In the ieee80211_setup_sdata() we check if the interface type is valid and, if not, call BUG(). This should never happen, but if there is something wrong with the code, it will not be caught until the bug happens when an interface is being set up. Calling BUG() is too extreme for this and a WARN_ON() would be better used instead. Change that. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1493,7 +1493,7 @@ static void ieee80211_setup_sdata(struct break; case NL80211_IFTYPE_UNSPECIFIED: case NUM_NL80211_IFTYPES: - BUG(); + WARN_ON(1); break; }