Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3706061ybz; Mon, 20 Apr 2020 08:02:07 -0700 (PDT) X-Google-Smtp-Source: APiQypKHdGanblZihSiCfA99hR1aKVYHDWpi6ukSbKPejMcYhVe8yPuoQharXRrfeX/S4TCFFsA5 X-Received: by 2002:a17:906:edb5:: with SMTP id sa21mr16890885ejb.270.1587394926810; Mon, 20 Apr 2020 08:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587394926; cv=none; d=google.com; s=arc-20160816; b=FRPx4Zw4kOb6M+QO36YqUNZJFWFXVXp3QhNoyLGJQbJ1bLy7iUbAnRaSQ4PzqyJhxL wJHCBVBxGiIi+GUBc0LRPUJFR4ixrKsRir9RcpwBrzQUG5X9NkWdRmxjARrx1SjR2igh rJU8ASNfykiFNqsTfGvdg8vJ511i2jk4lxb1dhGANGzP2S3rUXvDLuP7Ta9ksy7b+kn9 JfS/MU8tD5SsmRCyGNFDKq2xdpPsK/SXoF192xhyNz8ZPUt8mc1yGOLfMUA/CS9tfvtm aMh85x/5DiP05Ve9lW6S0WhDYnxn/3DsS5R8dG4FF8sq3+872Mp2LOIdZYjPcvBrDek7 eL5w== 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=uokIeFU4/8gZ/qpBSL4sFXKoVujMKUAuEvFyNgTCKB4=; b=hIPAxMplhZEq5pMnv0Fgeph8xoEm9tvCMajMRZOF8h1IsN3+KY+feWz5p1u4QzTXlq K1u6VqrkHd/rfBhtBnMkp1UPwbjvMlfY+knGijT53Pk5UIc0HKt9kpVc/EXpYJ++ZVYm DmOvd9VdqXNMUdrSjIOi/WHnYAEGrFzSZ/iEgTTtYqbs54NVYuHZepglTsI9GdVooRm0 UsLaqImKw9MH+FPeQ0eUNo4OanbgN7Z3u8hcUgnservkOVk3Nn2yIzBkp/hLiHEaKn19 VdPcmdFb+Dp3+ymn8gCsmtRXEI2acjstmAVdqCCaFJOB79GORxoDce53BQ+/JArycDvd LKNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qt4si670505ejb.447.2020.04.20.08.01.12; Mon, 20 Apr 2020 08:02:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728388AbgDTNv1 (ORCPT + 99 others); Mon, 20 Apr 2020 09:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726725AbgDTNv1 (ORCPT ); Mon, 20 Apr 2020 09:51:27 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D491C061A0C for ; Mon, 20 Apr 2020 06:51:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: scerveau) with ESMTPSA id 9EE042A0E54 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= To: linux-bluetooth@vger.kernel.org Cc: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Subject: [PATCH 0/1] add hog ref in hog_attach_instance Date: Mon, 20 Apr 2020 15:51:11 +0200 Message-Id: <20200420135112.6749-1-scerveau@collabora.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org When I tried to connect a bluetooth gamepad 8718, I was experiencing a crash which can be reproduced always. https://www.amazon.com/Controller-PowerLead-Wireless-Compatible-Android/dp/B07XJ37HPK After investigation, it appears that instance was not reffed initially when added to the slist and double free was requested on this hog during the free of the slist (unref during a destroy_gatt_req). Stéphane Cerveau (1): add hog ref before adding to instances profiles/input/hog-lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1