Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp12090353imu; Tue, 1 Jan 2019 14:07:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN6FG4UKryIRNl80+zlidU/1QY98WTIfO+LsPv5YelvYsGq9YBb07y6nZq16C8LN2McAmJiz X-Received: by 2002:a17:902:280b:: with SMTP id e11mr41643652plb.269.1546380447452; Tue, 01 Jan 2019 14:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546380447; cv=none; d=google.com; s=arc-20160816; b=vqQSXDCizyv6fuBgTb2/n8R6uu35n41iCDkVKCzcveTi1S1gSrxe8XK9bw/xVd6hiO 485YB1z+F8I/kp5AzSsfLv42WS/nvHTDQxEprjVFSSSYb+vFBIyBHlhmewC3edfAwYwa NpPNr+zA0xWw8qBc9r3/gKvPzfO711Xf1Wg27+EZe2R9SkJW+IC/maoIlbEiMk6gG3NZ PAUkNiL9e3UXsGP8moqJMwNurBLp4MapnZSqvUg5i/WYk85yP4/HDRc4TvifyLGw0Gva TyRBubTZzelpa5HCUMYICxEqA11EBrBywYV/5NUB62ucUYQBpwO2Qg7xi/sFX48+qtuP ygYw== 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=4wi2VaZ93NAj1XEIFe4Er8nHv1GWc0zEzcdIIZgeLyA=; b=ioONg7s1Y/Oa5mMeIdKHVmib8/PKyTdMqurETZJHVamiskCIaFW0rP7ddsJh1HwNuS Wt6KKReOH0tSs2UwVEhoxilyIMskIeuOKr0b4CWa6sD7vz6cEmMBpAdu59brSSR1ys1T Kn0nm6V2a3TGKUEyQjjBBWBwrMvxTE2bK15p17Y4+iFdfCBLW3QZdGUNGpGdCa+rJnyf J8KdJAPrjvVBTNSN6caYq6DUXkx1qUQL/nHoiGTIh1+JLi/wODZ5npGs/xM6V+I/CVvI VBgirdA8NE9A2jrQW3VCs2e1RU7CrE+teyqoZrhKgmcTp8Z2qU/PuNJv4evGZWSDFq5Y tjEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dts5fE7J; 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 t18si764540pgu.476.2019.01.01.14.06.55; Tue, 01 Jan 2019 14:07:27 -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=Dts5fE7J; 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 S1727136AbfAATpl (ORCPT + 99 others); Tue, 1 Jan 2019 14:45:41 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34905 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbfAATpl (ORCPT ); Tue, 1 Jan 2019 14:45:41 -0500 Received: by mail-wm1-f68.google.com with SMTP id t200so14192981wmt.0 for ; Tue, 01 Jan 2019 11:45:38 -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=4wi2VaZ93NAj1XEIFe4Er8nHv1GWc0zEzcdIIZgeLyA=; b=Dts5fE7JixS0DCIjP3ufJyIPIosrqNFjKt66wabVEdfWN+N9NHuaHip/wMojcXJcg+ LpCFTbcoh71guSDQAan40mmEq2nznRuA/Vh9kH4IZeD2KOXwVRop1L15ZXRNEtFUtDhQ QAvWQyRAtx/XAMcHWjQdofYS2e2VJH3aaGfGWQVFUom25N50I5iGyvqi7CMS8UTsZQoX y/II2Z9uEfwIoEHhYiWmrRRlRfaBti+3YuE2QhiXCTe/ykQx3KyAIjvnZG7dXMu44h3U PX2bvXMIkuqTkcsatZRgY8S58hQ8pAeDjzJSEBBqjJbkQh8M1z0eJnnr4mewIhioMNLJ W1EA== 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=4wi2VaZ93NAj1XEIFe4Er8nHv1GWc0zEzcdIIZgeLyA=; b=AZZY9kEVrDCknaR/S78VEpQqECCuZDiRE1sDAGF8/XJbX4O1BMM+1UCWboq+qBlUGt SMZ/SSVA4c6YwIuvI+rC1fUem9OtFI8POrcTeFSvOZ6F9QwIF3iTpF/ykY7pXGdZ1HmM m0m+XTrkgwevUbTrt3t9qpFfd6knFOMsyQMvQ8yifzQQPu3Drsny1cMLe2m0mik/vfqA lfNhLXMe9lY+HW0fuVrze8lG/D93IC1lcJhzK/PYvqrwFgUxLRpsW4COgTOTuzv1+SxL 2ORdzlum7lJzgfPRAUA4YP63dJUcPfSO7bYHjblqg7J7guIVA2TJkEtQSkO1IFCdcrrJ +dHg== X-Gm-Message-State: AA+aEWaG67PMKQkOOWFITeEQMhaBuCo2e10tw5HmzfQxkWomaOSt1oxA 2pHTQmQ9S5eaDEZ6cP7+hqx2FHrl X-Received: by 2002:a1c:1801:: with SMTP id 1mr36266412wmy.153.1546371937742; Tue, 01 Jan 2019 11:45:37 -0800 (PST) Received: from ?IPv6:2a02:8108:85c0:3a84:1f23:d0c6:20df:6ac1? ([2a02:8108:85c0:3a84:1f23:d0c6:20df:6ac1]) by smtp.gmail.com with ESMTPSA id n5sm40915518wrr.94.2019.01.01.11.45.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jan 2019 11:45:37 -0800 (PST) Subject: Re: [PATCH] Revert "staging:r8188eu: use lib80211 CCMP decrypt" To: Ivan Safonov , Larry Finger , gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20181230183918.3888-1-straube.linux@gmail.com> <4dd17d38-8c4d-b5db-1091-edba0d95cadf@gmail.com> From: Michael Straube Message-ID: Date: Tue, 1 Jan 2019 20:45:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <4dd17d38-8c4d-b5db-1091-edba0d95cadf@gmail.com> 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 On 1/1/19 10:02 AM, Ivan Safonov wrote: > 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 ). > So with these changes try_then_request_module() would work properly? > 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 ). > I reverted that patch (there are conflicts meanwhile) and removed try_then_request_module() in rtw_aes_encrypt() and it looks good. Perhaps the same applies for the reverted TKIP changes? Michael > 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 >> >>