Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp96517ybl; Thu, 9 Jan 2020 17:42:29 -0800 (PST) X-Google-Smtp-Source: APXvYqydMVgYedv0Z3lGPntKpbkoThBA9Dg4qXyzVHl7aasFKntxR/R1mUZD0qLUo86cd8tBb0dq X-Received: by 2002:a9d:6e03:: with SMTP id e3mr668597otr.46.1578620549026; Thu, 09 Jan 2020 17:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578620549; cv=none; d=google.com; s=arc-20160816; b=v5bsQY2tMh0NKb3y5PHr2CrRewnXAwobDW9v1t13KjBQfMuSHhLIZDEtE2VeKwpvnR S96F1/7dwFfFomkbXZp03iavSA6mIVti5eL5ZdhnkPdbTRM/bx/DD8GyFxSStTaRO+UD HbbjHMVp/4OB3xBZnNQxRVQTewLWyIMP5EHYc1Fli+6qF9Hua9ouqDpTEO5Bexh1k3w2 T9QHlg9w07qJ31rn0cL0urekxXrS/2PpKwP+qSjn658qiBFY+u77IdRqL1XU1tZojxck CEIcUc0urADjKmafR2myERwIwl7VpSKsTdUgQse5IzKXwPqNckoqcRw2P/njr2oUPIOY NE0w== 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:mime-version :message-id:date:subject:cc:to:from; bh=aQJ/J3bJbRbPWy8nMjjvv16BKZOPkqHPoVdfNSvrTdk=; b=bx8AA1Gyr8MMk5nIrMsk/Z05lSMMZHvjMJsTR/q7R9VQ2MOnLpyTKUpwFe8VyXgg6V DZCPbeQgV8qhF3sp9N7/R7gpP9fOx6acF9cY7+h1jwKJKqj9UsZAH17jgijFvI/bV5m9 Qp3edAmUtXESq3CxcNMrgcjvwsxN8qWpHxy9OXB+p9G/8WMUsRfgnNdH1GCe8VNRPZIS J+ixdKIbXhHAnvc8GkS3ZC2FpuVJN7O2xy4dTKaTAHP29jFI5cp69Rlo/nrgi48ASifc 3PEQm7V67vHMxsz2DGYwxkd+g/hS6Rm5gbjpwEeTh5vXqaARSKr76dwTZ2Mb2HrUXMDy yQWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si164741oiv.267.2020.01.09.17.41.50; Thu, 09 Jan 2020 17:42:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730619AbgAJBlr (ORCPT + 99 others); Thu, 9 Jan 2020 20:41:47 -0500 Received: from mga01.intel.com ([192.55.52.88]:58409 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730596AbgAJBlr (ORCPT ); Thu, 9 Jan 2020 20:41:47 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 17:41:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,414,1571727600"; d="scan'208";a="236689153" Received: from ingas-nuc1.sea.intel.com ([10.254.104.252]) by orsmga002.jf.intel.com with ESMTP; 09 Jan 2020 17:41:46 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 0/2] Fix AppKey deletion Date: Thu, 9 Jan 2020 17:41:43 -0800 Message-Id: <20200110014145.1785-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch set contains fixes for: - deleting individual app key deletion as a result receiving Config AppKey Delete message. The fix removes a dulpicate attempt to write to config storage and some function call simplifications - deleting a number of appkeys as a result of receiving Config NetKey Delete message. When deleting multiple entries from a queue, do not use queue iteration mechanism as the deletion of multiple entries may result in seg fault. Instead, find and delete bound keys one by one until none are found. Inga Stotland (2): mesh: Fix logic in AppKey deletion mesh: Fix wholesale deletion of appkeys bound to a netkey mesh/appkey.c | 32 ++++++++++++++++++++++++-------- mesh/node.c | 29 ++--------------------------- mesh/node.h | 4 ++-- 3 files changed, 28 insertions(+), 37 deletions(-) -- 2.21.1