Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11731126imu; Tue, 1 Jan 2019 05:39:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NdZmpNuEJo/xjppaGQJe+W3RtVGGkoGyV/mxE7fw0GIh4MiPeZRuv4yRiY4zpHGAuall3 X-Received: by 2002:a17:902:a03:: with SMTP id 3mr40633465plo.112.1546349963980; Tue, 01 Jan 2019 05:39:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546349963; cv=none; d=google.com; s=arc-20160816; b=fMunvR56GTdEFxWCybQ9+M7eYqkFhdINH4Vv4RYSqIAQtYc8GXo1CxU25YwT/TrxP9 i+K2kLc3euN1GoEwudNDFFyFuQviUoVajbRuNO7ngRJ/SZRHsrdsTBLdLAEDYK4PoXFJ GRKB84Lf2uEGGNjzO1QIcVugWaoUx5eVw6zu/5yrQy7rsobQ+MJhhTpbmDl2lnlZ6nJJ UZ/F1tGhKb2UbHeITWeVVSHWUXZJXcRQvZlvz9i9Cp7peHv1FIMmC1yDRTHOIyEBS4P0 vnzIDFcNIdTwcEM2SVM87fBIXLZmdZsjP5QOXNvgxsZ2g72MrszsK8DsoPKfKXj1Tfqx B2bg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=6e7XHgxGECzkpmNiy1smp5NrDTB/dBXyTg9co5l4zuI=; b=gV3fHNi4P5MgKCvF3anbAZGPM8u4PgszskdgjowwuQvni5BnFG7g5cevGtaERqnkmx KrKPCGf7NwODeoQiBdxDKXQb2aOFcWFDaBFiYyqbDYGFv82lnaI5Ehq0emVTwn1ILPtn OIZaxVmOGt2QSrhT12SilBDMdji0V2j3pOWpUOH3PtOkPEa4uputejEV//VDvD77KOWx Jk64RP6uh0DnISG8OFeemjnzzGfGbaQ7aZVcJgQniPowSIUBBwgoZNoPgtyKs88ayZWO 4YbAYMvr09a6n2fJjfuEaXPkOjGkbczo6cKIT7iUTIy+G7+blSbTwew1A1PmUwlSMxV2 Ld9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EGKDiSWe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i64si3233911pge.361.2019.01.01.05.38.46; Tue, 01 Jan 2019 05:39:23 -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=@gmail.com header.s=20161025 header.b=EGKDiSWe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728603AbfAAJAB (ORCPT + 99 others); Tue, 1 Jan 2019 04:00:01 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33229 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfAAJAB (ORCPT ); Tue, 1 Jan 2019 04:00:01 -0500 Received: by mail-lj1-f195.google.com with SMTP id v1-v6so24885636ljd.0 for ; Tue, 01 Jan 2019 01:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6e7XHgxGECzkpmNiy1smp5NrDTB/dBXyTg9co5l4zuI=; b=EGKDiSWexgSr1XkUIc6aZ+klB17X3vPU9mkKPr9eGoMdanekxdfiSlyW1alwt80Gnz MHa77jJQu5/tv2EBTYGVXppUAxr98rJR4pTMcaFlMneSNq49p3ac/J9wQpoqtQsnEzfK rXpTK5wPoQs/Qrl20D94NKsQY5uOqKy5TBNWT+Qfythheru9dCx4HKlc/Toc58PNWBw3 JzL12AbPdn5N5nbYusdy10VfabYLVh0RwE65hsoLmhRhIdmNgjjeHMFV1qeyfzTjuds+ A+h4OiBxZRPNK4H5auBkEeK5Cztar0s8WABKQwOSA1GvgWwXgF1xny9912OMK1on3JNA XKZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6e7XHgxGECzkpmNiy1smp5NrDTB/dBXyTg9co5l4zuI=; b=XxUWK2c6AX0/L1huS1gFJRB6WeaMOLN+rvH6vW9frsv3HnGEJuKGnWce040tyE4h9v 57Rxj4OXleVXxhjcuJjSCrvb8MBgQIUA2ub9jiJ/h9QEdrIy1j2bq/PnQBs0QxHF7qLj 8ot+MStsUwAJyw21QTEQqjT3rSOyt53Lm0r6tEzFuT5zR0IdYEBzewYnftov5DnKXA19 G8FYT/7L8vSdymI9K87AVATMhrvRVZ+uyFsj9lofBWltGp+ozz/taIdBd0rLkeUQTDaT zLSa/jc13E6l5B1r0taEc5BmlYyl+vGSwYP7vRQaha77QeiQqNz3Zw2uRy/Z2YUWWoJW 16ag== X-Gm-Message-State: AJcUukd6PdU0uIbdanEcMtK+HjfWwDSDUCIasi/vF/uU/s6xmmUlYMfL BhMDGWCabjUV43BLBqsMLcIeJuLN X-Received: by 2002:a2e:8643:: with SMTP id i3-v6mr19175698ljj.43.1546333199176; Tue, 01 Jan 2019 00:59:59 -0800 (PST) Received: from [192.168.0.160] ([178.71.223.48]) by smtp.gmail.com with ESMTPSA id c133sm10654629lfc.45.2019.01.01.00.59.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jan 2019 00:59:58 -0800 (PST) Subject: Re: [PATCH] Revert "staging:r8188eu: use lib80211 CCMP decrypt" To: Larry Finger , Michael Straube , gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20181230183918.3888-1-straube.linux@gmail.com> From: Ivan Safonov Message-ID: <4dd17d38-8c4d-b5db-1091-edba0d95cadf@gmail.com> Date: Tue, 1 Jan 2019 12:02:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I suggested a patch for loading modules from interruptible mode, but this patch remained unclaimed ( http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124851.html ). For some reason I thought that this patch had been removed and did not track the fate of this code ( http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124573.html ). On 1/1/19 5:17 AM, Larry Finger wrote: > On 12/30/18 12:39 PM, Michael Straube wrote: >> Commit 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") >> is causing hardfreeze whenever the driver tries to connect to my wifi >> network. That makes the driver unusable on my system. Reverting the >> commit fixes the issue and the driver works properly. >> >> Dec 29 19:21:17 gentoo kernel: BUG: scheduling while atomic: >> swapper/6/0/0x00000100 > > Michael, > > I have verified the freezes that you see. Although I have not been able > to capture the console dump, I think we are likely seeing the same problem. > > I do have a work-around in that I have not gotten any freezes when I > force module lib80211_crypt_ccmp to be loaded before I load module > r8188eu. This clue was used in finding what seems to be a good fix. > > I do not know anything about demand loading of modules using > try_then_request_module(); however, I noticed that the macro actually > calls __request_module(), which has the following comment: > >  * Load a module using the user mode module loader. The function returns >  * zero on success or a negative errno code or positive exit code from >  * "modprobe" on failure. Note that a successful module load does not mean >  * the module did not then unload and exit on an error of its own. Callers >  * must check that the service they requested is now available not blindly >  * invoke it. > > I note that it says "user mode module loader". Routine rtw_aes_decrypt() > is likely inside some sort of locking, which leads to the "scheduling > while atomic" bug that you see. As a result, I suspect that the module > is not loaded, and that leads to the NULL dereference when the module is > accessed. Please try the one-line patch attached, which forces lib80211 > to load when r8188eu is loaded. With this patch, I have been connected > to an AES-encrypted AP for nearly 3 hours with no problems. > > Larry > >