Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5518240rwb; Wed, 9 Aug 2023 05:34:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqMAIKZ9MuSrL8P0sxghERfEcMkVTR+Z/ZjYlO5gzqQwXIgRpEdPh2X2SNfX+aOJnKiy0/ X-Received: by 2002:a05:6a20:4290:b0:13f:7c0e:dc6e with SMTP id o16-20020a056a20429000b0013f7c0edc6emr2635367pzj.59.1691584450428; Wed, 09 Aug 2023 05:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691584450; cv=none; d=google.com; s=arc-20160816; b=zvw3VSlrLX1LK7c0ef54eOrERxmEM3QjiO07DS4dFPJ1ng4CfHw2ah8ZSJQR4o8w0z X6/QFOVkX3zCSezZ/Uwe/hWhSh0hDwHpqcbHWVc+rWpEssLN2JDblM8kMgBxZ0bJOsdQ 1Uw1WJDtNNUs+WHsv6U4VLvn0QqP8KGTbME9IGucvTwGSxq1hiqeoVjmlhop7FI6n1ZS c35VgmWTifivlOPHk47P9SE5ceKDR/7NAlu4+/TBlEs1LG4xC4m/0A45929kfJMq3Mbt UYXg0CK7V8JAPDmtX/XWvYh/+HTN6sscBRw8LNLoRXGgVfQklvQT6QSQwUMRNPRqqOS2 u8xQ== 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 :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=DQLHThCaayDo78KE2Hy9nCESygQGK76URhOSoh3WTjc=; fh=DFpZLBujhCHCpmuYkNNsm7uFCQ+uquEXTGNddalec4A=; b=P1FN7qbTqnJvY3bzjaX1q706DtomEoSoyoVQNyeCT/V8pDVqu8l/JvL1FPbaANej5v zRd4YpkyVmzE+W5VXuLK+H+Jlcf4Z429KgyMuZq1q9vjscHG3dpx93qq5qB38XoOZzGj tzFCuu1p3g/meKahwPs/QU0t77B59qWXDUF63zsrpsI3GMkoKZWTC8E0mYrQy//a9/Ne yWkLLW4myAcQpB4fN841ZJcgYhxARw5PBW4ow9WWNoy4xrg4OnBrEECbJK0nSeD98A9r VE2wp+bAQJzwdBdSGmN/F9ZMHIh47UaGAXuzFm2x/u3aE4Sgx2zy9/yGO2E08gT9jPNg ualw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=pU6hyJLp; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a170903008a00b001bb9370760fsi6451446pld.90.2023.08.09.05.34.02; Wed, 09 Aug 2023 05:34:10 -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=@sipsolutions.net header.s=mail header.b=pU6hyJLp; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231672AbjHIMSR (ORCPT + 56 others); Wed, 9 Aug 2023 08:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjHIMSR (ORCPT ); Wed, 9 Aug 2023 08:18:17 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EA011702 for ; Wed, 9 Aug 2023 05:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=DQLHThCaayDo78KE2Hy9nCESygQGK76URhOSoh3WTjc=; t=1691583496; x=1692793096; b=pU6hyJLpZP0FCdDv2sabPymWn44WlFyWvl3AodzWKM+e+3u CXvkv85/z3nyz8y1NdmuITJysDYYe9mQ0NZKe/ojQZCbuLTEGqAqw//ML32UJLNHiwEnCDqLnojTu x9rupUqqAsGVm2EFWUr/GQkcBP1lfc3tghbCRCT86c0E59RYuocvKa9BZwZeNo7YFuGHDLmaqhM4e k/Gb9rLOJL1qyWIbAOhgsS+aUxCsMefm7bW/rNmnBv+0nHrLUScwTaT3XzvORPduv+n2/UrThd1P1 q2ZRJX+SLWTRpvQamtJfbcbEUZBkFXmY2LKOZ0PpL4c8xUGsnO8Ra+bKfO3rQSaQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1qTi8f-00Ecco-1U; Wed, 09 Aug 2023 14:18:09 +0200 Message-ID: <7b27fa9f59bec600069bba9c2acd9f28dd753923.camel@sipsolutions.net> Subject: Re: [PATCH 2/2] wifi: ath12k: fix undefined behavior with __fls in dp From: Johannes Berg To: Harshitha Prem , ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Date: Wed, 09 Aug 2023 14:18:08 +0200 In-Reply-To: <5cabcc57acd781e90c35fcc9b3c6a8aa8fbaa581.camel@sipsolutions.net> References: <20230809042738.13394-1-quic_hprem@quicinc.com> <20230809042738.13394-3-quic_hprem@quicinc.com> <5cabcc57acd781e90c35fcc9b3c6a8aa8fbaa581.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 On Wed, 2023-08-09 at 14:17 +0200, Johannes Berg wrote: > On Wed, 2023-08-09 at 09:57 +0530, Harshitha Prem wrote: > >=20 > > During the crash, the fragment id of that packet was 0 and > > __fls returned a junk value. Hence, it was identified that "__fls" > > would have an undefined behavior if the argument is passed as "0". > > Therefore, add changes to handle the same. >=20 > Umm. That makes it sound like you are surprised by this behaviour of > __fls() and expected something else?! Please go read the documentation, > and then rewrite the commit message. You really shouldn't be surprised > by this. >=20 Also, btw, "Fixes:" tags would be nice for fixes. I'm sure Kalle has brought that up a million times before ;) johannes