Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5256265imu; Tue, 15 Jan 2019 14:12:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN784KdyPhFAK3M+cdZ6zgvOTyj42Wmtz846+ZBDGK1OaQ76tRkoAPl+nHX1GGPQ6c0uloLI X-Received: by 2002:a62:5d0c:: with SMTP id r12mr6545176pfb.0.1547590327948; Tue, 15 Jan 2019 14:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547590327; cv=none; d=google.com; s=arc-20160816; b=1AWOCFzCJYRqNf+elfvKZr/laC56/sWyRt1YrHBIhAombRs6mGhRUX2pm7pi2BS3V/ P3UBIJ6bhd0TKufJQofuO4TV29BesYNoqYn9mjKV15lPP0pcizRWQnSLSP0nPjCd26YA En1QW2Buph9xiAAGTiYYXjS16nwxfwhvAdIDy+0RF+JcnGSU10QpFtU/LsvdvDOOxiQK Gr0L0uktysIr4ngUm+gX9a4dYIwFdirF7xT1yUnCIjEuWhy49ZbT0tUGdKbUJxaKKDpT wTNcR72YfKwq3PgTnM3v5NLsei+4Fc0n63owC5OMOXDdTwBNw4AocEXAas15dem2eWoD kVjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vl+atCqY3wLr8FWf52I9H38qSsqiY/OD+i0kJztNLCw=; b=h5bH4ft7u8r7f3RHIyvGg44eNnq8ipWdiUEen2Pidk+9HZbPc0y2oMSSv4u9ph5J0y eeptqe1yd8knbJPqLxLAAMgMGYzPXZ4xZ4E8VuMeXpr4TYgJX07pWAiDoVcIGvNAcAWX tNpXIpHzJol10J0DJJfqHeKwgLVDDT+XaUkSrmb7u9VB61ZfG6Z7+lHW4hP61CUsHOpA 8ddbtT5l9XX/bTNPvNKOHEOqrSJGq9S0aqVOSarU/B9uKrtpWsfa4LyCdYRYR5OrJtyn JYpQq91pb9x4k5M7p6ac6/Dw0oBnvSxCN/AtmAxGoX+j8dNRVovdH5KYEExSRzI5a6Au 8tDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="QbP/dNJ/"; 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 p16si4139760pff.272.2019.01.15.14.11.51; Tue, 15 Jan 2019 14:12:07 -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=pass header.i=@kernel.org header.s=default header.b="QbP/dNJ/"; 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 S1732196AbfAOQwL (ORCPT + 99 others); Tue, 15 Jan 2019 11:52:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:34266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387595AbfAOQom (ORCPT ); Tue, 15 Jan 2019 11:44:42 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 286D22054F; Tue, 15 Jan 2019 16:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570681; bh=vqDcyQf2MOYxU7Z6szRRGEjZMOzoweA0oiGdDv42pv8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QbP/dNJ/4FYtsr31hnQH69gRXwp2y432UDOB7WJ/Jlfc/97TO8oK9UTDiONxzmR/E fYg33lkIsEL8tl054V4DmtnY5d7/V2OwdreWwqi2zi6yTbsVQPxTS/djHrXxi/EFAT ZAfUEZHJ2GO8nibKjP9ysMr1z6xYihHvWzRFrm3g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Straube , Ivan Safonov , Larry Finger Subject: [PATCH 4.20 05/57] staging: rtl8188eu: Fix module loading from tasklet for WEP encryption Date: Tue, 15 Jan 2019 17:35:46 +0100 Message-Id: <20190115154911.021805310@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154910.734892368@linuxfoundation.org> References: <20190115154910.734892368@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Larry Finger commit 7775665aadc48a562051834a73519129bf717d73 upstream. Commit 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a WEP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be forced by calling lib80211_get_crypto_ops() directly rather than indirectly through try_then_request_module(). With this change, no BUG messages are logged. Fixes: 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") Cc: Stable # v4.17+ Cc: Michael Straube Cc: Ivan Safonov Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/core/rtw_security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -154,7 +154,7 @@ void rtw_wep_encrypt(struct adapter *pad pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset; - crypto_ops = try_then_request_module(lib80211_get_crypto_ops("WEP"), "lib80211_crypt_wep"); + crypto_ops = lib80211_get_crypto_ops("WEP"); if (!crypto_ops) return; @@ -210,7 +210,7 @@ int rtw_wep_decrypt(struct adapter *pad void *crypto_private = NULL; int status = _SUCCESS; const int keyindex = prxattrib->key_index; - struct lib80211_crypto_ops *crypto_ops = try_then_request_module(lib80211_get_crypto_ops("WEP"), "lib80211_crypt_wep"); + struct lib80211_crypto_ops *crypto_ops = lib80211_get_crypto_ops("WEP"); char iv[4], icv[4]; if (!crypto_ops) {