Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1899089rwb; Thu, 8 Dec 2022 17:12:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf65XvB8SFb4+MVfi/ZHyAK3xMcW8cLoKn00gt6ZY2et3sESBfwfuIW6cM5CLCuUiZZISSv5 X-Received: by 2002:a17:902:d48b:b0:189:63be:8abf with SMTP id c11-20020a170902d48b00b0018963be8abfmr5083463plg.53.1670548361340; Thu, 08 Dec 2022 17:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670548361; cv=none; d=google.com; s=arc-20160816; b=CzCdKr0tJHQCgdmL4KrTb33sURQ234Jcw+U/ElunTrFkXbiNBMjYulIk4MlaVqHm6e XkInvWfxzXF1XKLYimmxBFJgjXSIofSN/rzbkuASE6R5V1ODRPhoDOSI+nPUvPRy6nek 2B+SLuO7mC6xgfvw4YEeYouylDB/V2nyg1bygGFPZKtbtOjCv7NyfuvzJdVJcFm33ys1 gcTFvwV8Rn3SQoKnOFtPCkMo6iTGoQyRYyVciCiaGiCuMc0UXT7Jm2wPEALFK7zCBLNO eYop4KvDB2OT2C0lRYC5o1a9w+5HWKXX/CEs6MDrfUxhPjN4U1x9oobXmuniRGEaz89W y4ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=HPxlPB77OzQNUBW1EgOuo55XCJcGR0T2VxU+nuwk8GY=; b=M2d0z7hF4lNOmaKvv48Ck4+m3Yhv0sOw+wpBHNmJUstyncVgM4fXrhqp0+J7wuPWZi J08FxHAB/1/npPZk9bZS7rh1LxaNmmP6Ga7qXS8GxJXF93tCKRALna6CFHET4Pj6r/Se QdOaeWAQtero+G4Wih/pHIZFspHLllVdFSIA97ul6lYwPFHBJCn4/KJgJUGw1C/6m9Ca Q87J4P9Ywf/CnrX7bgdhMgse78QE3CneCaHObZ9Mu+HNk2mXJ7tKQkLzC3SV+otVLC7p M1e5nvOr4QzjZZZ+VOgbq1OUpjP7lxTv1Pgg4xPobCUa2l0NYyFGa1rVrJaO/j5P8hln tb6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dluj3XPJ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020a170902ecc900b001897e34ac5dsi212408plh.289.2022.12.08.17.12.29; Thu, 08 Dec 2022 17:12:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-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=@gmail.com header.s=20210112 header.b=dluj3XPJ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S229523AbiLIBDT (ORCPT + 99 others); Thu, 8 Dec 2022 20:03:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiLIBDR (ORCPT ); Thu, 8 Dec 2022 20:03:17 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A0D775BC4 for ; Thu, 8 Dec 2022 17:03:17 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so3362829pjd.0 for ; Thu, 08 Dec 2022 17:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=HPxlPB77OzQNUBW1EgOuo55XCJcGR0T2VxU+nuwk8GY=; b=dluj3XPJ+KZScL0LGl/nZhmAgImQu718K3UJ2FLKbHKygChyw/LeSu796II9/bQJ1v u1Gbaux0bbgTTixFjhb+B4lQ/gVyBtOvwMPNUIWvVOVoqZdQGKuHL49RV22aXyymL855 qj8ZitpFI3JtJPVHUr3cQV1beFRL8ZE+Li7uSSrwRkT7FDDAEm8FtsTf25dSR2+rwyXD EmCtQKkscqlirHe76P8brHefdjy/qN3DSRw9kcAz6+yMOvZuZmv9wlCwKbK5RE7Iq0IP 0lT0AzxHODz1GAtkaA9QDR3t2Endp2aff1zwL/llh/O9kWd1X5zOqrsVOZdcnXNHn8OG 7VzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HPxlPB77OzQNUBW1EgOuo55XCJcGR0T2VxU+nuwk8GY=; b=Cjtaq+DheY/QUztYEMZNiYJidcLQ601K2ZkK0fwzai2S7UrzixjRJEpNL/k48lI2fN aF45Ysfc8Y8EKGMCaZOeYUuTjnfxtBNPWLpAzQIsFFvN+S8Am3e+0nN7I7+ibmLQCYnH o9IEsXQCecsLkLtGKo3wX1pYSD5PESAvak1VKqHamYo3ky2zEs3kvkEvlngxyZhZJua3 MWeC3jHQfKsSs2nBfk374AoHN8KGbTAO6EtZ3piHJixIORTDwlqLM8LRWUNyLbYNlvcL QdPEk6q8qiVkjkCULPrS4X/VhABbE2R3AL9vJfI/w9PQjR7ey0P8ub4m/3A1W3HfglRA jCMw== X-Gm-Message-State: ANoB5pnjQ1UiEBvNeoagDCmOJal/IGAn6Wizw1fDvqrTcl9cJRK4hH7Z +QO9uOHeopfZIwfSQNvdpVG2wP4hdzlV5g== X-Received: by 2002:a05:6a20:b042:b0:a9:ec2a:1013 with SMTP id dx2-20020a056a20b04200b000a9ec2a1013mr4175162pzb.56.1670547795872; Thu, 08 Dec 2022 17:03:15 -0800 (PST) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id z21-20020aa79495000000b005746c3b2445sm100253pfk.151.2022.12.08.17.03.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 17:03:15 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 1/5] shared/att: Fix not requeueing in the same channel Date: Thu, 8 Dec 2022 17:03:10 -0800 Message-Id: <20221209010314.707606-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz If request needs to be resend due to change in the security use the chan->queue otherwise it may end up using a different channel. --- src/shared/att.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/att.c b/src/shared/att.c index f7bef08bc169..b90af93ccbf8 100644 --- a/src/shared/att.c +++ b/src/shared/att.c @@ -799,8 +799,8 @@ static bool handle_error_rsp(struct bt_att_chan *chan, uint8_t *pdu, chan->pending_req = NULL; - /* Push operation back to request queue */ - return queue_push_head(att->req_queue, op); + /* Push operation back to channel queue */ + return queue_push_head(chan->queue, op); } static void handle_rsp(struct bt_att_chan *chan, uint8_t opcode, uint8_t *pdu, -- 2.37.3