Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1129076pxb; Fri, 1 Apr 2022 05:29:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhTT50hnTqV1AcFEyBM6rKugiVe8dcuyKV6FXabEx5oAXVk8LwE0nRQcGOtGyF7gOQaP4e X-Received: by 2002:a17:907:6296:b0:6da:745b:7b40 with SMTP id nd22-20020a170907629600b006da745b7b40mr9240297ejc.750.1648816197115; Fri, 01 Apr 2022 05:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648816197; cv=none; d=google.com; s=arc-20160816; b=txqHBTLx82TLznt2aur0K1yK6mxSb+sXSXEGw9VEAYGW0iob7wmIkz4yjqQEQLkeon uA4soTI7ObHES3iHIDBpBEtPy4+dpes5OzH1X5TV//KoHLqhAhGDT2wEMMCbEMEIu1hd XjEVevXmwA1oYEIeESeQdLy2d7/hsdHAb6B9/Ct4X7nxt0JT/nLmGKs/sYuP3neenE/+ fZP6svu1U7Q8GPnyBrTwQ8yC37oCz9U4Mf4gvuKzK0zHGXYpi8O4O0aIqsloRWZdGcbN wcByUFKC++dz8uBHOcGnKN8ZsJEgusac8CIbx3iyn7CVBMTt5xdPJjoW3nDzLn8lveNf ADnw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mdiIgJFQf3bRQRQXgKRpQFB1ekHms8Rnf7emGiLikSg=; b=qOy+lOd6ITE5VraR0nP2Skbc/pBO0GqjDDfvcPRYEQtd5HWFRSOoWROBEd80lnM8d7 2BztMHa8LqTH63EP3pAD43+55QfJuxgDgW09y1cxd7VIpTDnKjzst8J48NWMDVqidVYA RqwC3eyXVdnIo3QKsmerRl+W2UzhaN3XYUNgA10SaJUUCvh/3ta6cMYyuGMi5WeVcRGe SU3mcV/F/2B44WaTtEULQyJu9xbdxr+TMbDcZzxuwaVoeWlbnBa9Da0sOPV/qn+zXENG klQkc4n2kuCx8i3xcUYO+IvmtahXInGGcGP1SMW4KgATOU6O1leB9uPnn2HelUNuFDIu 4GpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Nv3ij0o/"; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a17090676ce00b006e07188f06dsi1601577ejn.317.2022.04.01.05.29.30; Fri, 01 Apr 2022 05:29:57 -0700 (PDT) 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=@intel.com header.s=Intel header.b="Nv3ij0o/"; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbiCaSJt (ORCPT + 99 others); Thu, 31 Mar 2022 14:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232396AbiCaSJt (ORCPT ); Thu, 31 Mar 2022 14:09:49 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F12F7F70 for ; Thu, 31 Mar 2022 11:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648750082; x=1680286082; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=th16P1XGwpjUoo9hOaZJ8a25dvMbgXOsTsg75iq3T+E=; b=Nv3ij0o//zfoYI8EoiryM2sZl+udLnxmYgBIkoIqZa1VSWnsZtgP7+a8 SfonAmkeyWgxz5A2+QzLfxA1lnGp39pCljybDdSynAeoEvbTZvCI8onKh NiT3YhfHfGkrwPJhwqJkeuy4MUnCt/Y7mmqC06m4sZE+arfiTa26wAvPV 24ULhyKXkfgWh4jioj+YqkIdVIMjSms1x+xNw/I1F7OLmzXSwImMnV+6y GXdAwSlhnqTWe/jMtJnI0TkoIa4QAwhuO3uAOmGaCYScTjQc/19yMuGQc 7fmvDvCFhPIB+jVN7RleAU3qv7EMho0wcjjZnAUkn42uhbmDBYJXuDKup Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="257495898" X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="257495898" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2022 11:08:01 -0700 X-IronPort-AV: E=Sophos;i="5.90,225,1643702400"; d="scan'208";a="840896161" Received: from coletonb-mobl.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.209.6.25]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2022 11:08:00 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: marcel@holtmann.org, luiz.dentz@gmail.com, brian.gix@intel.com Subject: [PATCH 1/3] Bluetooth: Keep MGMT pending queue ordered FIFO Date: Thu, 31 Mar 2022 11:07:47 -0700 Message-Id: <20220331180749.456913-2-brian.gix@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220331180749.456913-1-brian.gix@intel.com> References: <20220331180749.456913-1-brian.gix@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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_NONE,T_SCC_BODY_TEXT_LINE 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 Small change to add new commands to tail of the list, and find/remove them from the head of the list. Signed-off-by: Brian Gix --- net/bluetooth/mgmt_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c index 37eef2ce55ae..b69cfed62088 100644 --- a/net/bluetooth/mgmt_util.c +++ b/net/bluetooth/mgmt_util.c @@ -297,7 +297,7 @@ struct mgmt_pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, if (!cmd) return NULL; - list_add(&cmd->list, &hdev->mgmt_pending); + list_add_tail(&cmd->list, &hdev->mgmt_pending); return cmd; } -- 2.35.1