Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1354467pxb; Sat, 23 Apr 2022 04:33:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdIORaqHVTlrdjCcRJPtPo5bioXfgGRGWzYSHnwITpCDGJjMlqYosWQ5X7ozc+gTFufi+Y X-Received: by 2002:a63:6f87:0:b0:398:2d6d:848a with SMTP id k129-20020a636f87000000b003982d6d848amr7817656pgc.343.1650713639537; Sat, 23 Apr 2022 04:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650713639; cv=none; d=google.com; s=arc-20160816; b=W8h+6kG69sJMRsAnMZYCJlkWejA1ZQjuWuSVjuLZHy94ewQFWRcgTBsCK49f/jYVcX TfjWVhUMa8Z1HuOJq8OlAr8gqcSRpNQMB+SNuwxEx8Q2rcrtrk6HlX791RWlZX7oBxaN RvjR3imbqBmjFZIjsiDMkonSZcuS4M5DsE6gwj4WZ6GPWpU7opcg76dFFNS7rsswO5bu EF/95ONHEU2cS1JZckSgZgxTXKFNIr3Xzsr/aMTwXimapm7oxukJKBAQLvaLaY+YjXMe OxkZCrwcWK+kxqwdJ0AO8A15sl4f6+uRHJXcT6xeOGR5bAYJrnzSwYri99O3wGRf5bqI vsiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=WyeyUGSzBmerpJr3vKuhkhSiAT7xkBpd390XoIkIvg8=; b=tTFrvWvox+UUP2585NjBOM5a0Odi4GSxBN+x1uFIorrXjXJZDyyKfNm0rddF69xaMt sFe8TRq+GaKZb6ypDFiAjCwms2zdBET2x8G+eXqDl3gLyJkI2FTbj8r01qt+JjgpVGa4 +wIHAZIs36eQsM0feunk9bkuQ0WQqxrPKjKZJm1N8GzCQEo6yHMB5l7wg0bL+mS18N/p J2DamjyPJrSX82TvsP9hul3tJGY5lokUQqb7KkZa5gME2+BeqFh3E+P37lu+N3q1Sit8 OUlo9ySSksc4dTqPusiLAzTJUiPHKGHlWenjDWijQ0ubPc9H3+dP+Sgzt9rECGC2qfgS rv1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OhCz8b0y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y193-20020a638aca000000b0039ce7136f94si10750008pgd.408.2022.04.23.04.33.45; Sat, 23 Apr 2022 04:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OhCz8b0y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234685AbiDWJv4 (ORCPT + 66 others); Sat, 23 Apr 2022 05:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbiDWJvz (ORCPT ); Sat, 23 Apr 2022 05:51:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5C3CB10; Sat, 23 Apr 2022 02:48:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 82705B806A0; Sat, 23 Apr 2022 09:48:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B628C385A0; Sat, 23 Apr 2022 09:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650707332; bh=l6tflEWSR5lV+o/JXBVWUDuffggsvkyGue5F4BmnWsg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OhCz8b0yZd6aaJCPkrVHdqBEq+ZnNxkuzjdQYjil/2+Tk6x2+pAEPeh7wSd0GjkEz cNxt7lQ+huRFuxK1YkdHa9ZYNnTiaviN/pnxb5xkfLcjnkhqulXIT1U0+HVHheXj// OGgAdMFiIEOtMHxop+S73XD74lZd9wLoAE1KwGU0Q8VJyfgl3X+5DM8JXREogK/GBh 6EbDImuWvbhMeAwXf8SIPHTdppn5L18CdozFTNyEcUcTwEScZONPbPSB2h3ObOD8PA IgTyX2OHTAtcUjVrVq6ZswNzVkgmrJqIsqehKsQPXJAfPv3JtEYaWvJoK2PfoW8YM1 iCX/fQLvZUL1g== From: Kalle Valo To: Alexander Wetzel Cc: linux-wireless@vger.kernel.org, stable@vger.kernel.org, pa@panix.com Subject: Re: [PATCH] rtl8180: Prevent using not initialized queues References: <20220422145228.7567-1-alexander@wetzel-home.de> <87a6ccqpzg.fsf@tynnyri.adurom.net> Date: Sat, 23 Apr 2022 12:48:47 +0300 In-Reply-To: (Alexander Wetzel's message of "Sat, 23 Apr 2022 10:00:48 +0200") Message-ID: <877d7gm8ow.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Alexander Wetzel writes: > On 23.04.22 08:21, Kalle Valo wrote: >> Alexander Wetzel writes: >> >>> Using not existing queues can panic the kernel with rtl8180/rtl8185 >>> cards. Ignore the skb priority for those cards, they only have one >>> tx queue. >>> >>> Cc: stable@vger.kernel.org >>> Reported-by: pa@panix.com >>> Tested-by: pa@panix.com >>> Signed-off-by: Alexander Wetzel >>> --- >>> >>> Pierre Asselin (pa@panix.com) reported a kernel crash in the Gentoo forum: >>> https://forums.gentoo.org/viewtopic-t-1147832-postdays-0-postorder-asc-start-25.html >>> He also confirmed that this patch fixes the issue. >>> >>> In summary this happened: >>> After updating wpa_supplicant from 2.9 to 2.10 the kernel crashed with a >>> "divide error: 0000" when connecting to an AP. >>> Control port tx now tries to use IEEE80211_AC_VO for the priority, which >>> wpa_supplicants starts to use in 2.10. >>> >>> Since only the rtl8187se part of the driver supports QoS, the priority >>> of the skb is set to IEEE80211_AC_BE (2) by mac80211 for rtl8180/rtl8185 >>> cards. >>> >>> rtl8180 is then unconditionally reading out the priority and finally crashes on >>> drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c line 544 without this >>> patch: >>> idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries >>> >>> "ring->entries" is zero for rtl8180/rtl8185 cards, tx_ring[2] never got >>> initialized. >> >> All this after "---" line is very useful information but the actual >> commit log is just two sentences. I would copy all to the commit log. >> We don't need to limit the size of the commit log, on the contrary we >> should include all the information in it. >> > > I see what you mean, fine for me. > If you prefer I can also make an update but feel to handle that at > your convenience. If you e.g. see a better way to do that drop the > patch and simply submit your version. I can edit the commit log during commit, no need to resubmit because of this. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches