Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp604094ybh; Sat, 7 Mar 2020 06:01:15 -0800 (PST) X-Google-Smtp-Source: ADFU+vuBkb0wDLx/7ikuOTVC19JJoJbJSJzlhOo4GmKR74glT2NX8eFQicrKyYRJe+OXO73nQF/I X-Received: by 2002:a9d:6c1:: with SMTP id 59mr6867956otx.281.1583589675757; Sat, 07 Mar 2020 06:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583589675; cv=none; d=google.com; s=arc-20160816; b=0eTFdw/Kzo6MIQr2mP6GTsk5wwa3nbd5kUDxYkcoY2e9OjWC4qnHeKjDx0KrooWQ6I ZCtGsNWhloC989ZI58nV7o/E0A21A4naO9FgiCgQO9wdnWMJgvrmBpRrKVM67DNLHMxD 2SLfxu7zAP3Z6wuA+KBiAdQgk+H6x5SxHLY7fzQPfCcEIvHfF7NibA9wS03h0At5FGNp z+Mk4EBUdCr5Dg5lG7P1Itxy59uHWBpTlbh9H6/ujje2RfTzzkGgToZwZX/vln3RpY9D US0neHN21+RyB+FzuhqzvVfiICBi8/PoQx8leTfQaiIWDCBE4a0I1zVkeyCYhKHtJkfe 8c8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=YttYJY2hEu0o9ieZzIqW+Sf4nL0+gX4KSVXdg9N5DNU=; b=Puw3JErouQecJ0Q++M/5t80k4eAvFFykPfKGHHNCChAhvZr6XoK5cfi6o1GH/+jE7H zo10NTJ0bl/b6tJih6cSaZdTxhfTF0KTm3Ygv5eK5fPOzBY0KY3Z7ZuakX8pN6T08Ujh PGTnXp1WE2NUTew/mBzAfq60+41D6ko79NOdmgMK/SRdWGv63iROAJAcbE/VK9f0OMrE 1VXhS+VUGD6Yxc3iADqWyrhqDMo7d6z9D7Am82pKmLT0Fs+6oOW6WQxL3OqwoYAHxxjj AYPLnZA2K9J1lhu859KS2aJOpI1ddV8or6NBIryY35IPhe/NonZJpADIqoI+G9RoS34y m1kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zo5SiZ1A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si1395750oif.122.2020.03.07.06.00.49; Sat, 07 Mar 2020 06:01:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zo5SiZ1A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726193AbgCGN6P (ORCPT + 99 others); Sat, 7 Mar 2020 08:58:15 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46935 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbgCGN6P (ORCPT ); Sat, 7 Mar 2020 08:58:15 -0500 Received: by mail-pl1-f194.google.com with SMTP id w12so2055534pll.13; Sat, 07 Mar 2020 05:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YttYJY2hEu0o9ieZzIqW+Sf4nL0+gX4KSVXdg9N5DNU=; b=Zo5SiZ1APLQC++VQvG/MZYrhXfyqAhqKEHXuVf2gdx4xLkNQGvwi1/UiuiRXzi/RXn JXr9fhDCARuBH7pAZycvrKCz+HFxV7CwLiNb1m5d9dXgU90mGSETx2F4Y95QEGS/Wcy4 XEh5P5KF7phVHqe1YoR+KlvB/ycvu6wD7vqkMhAYxQPPKTi0CfAsvhc0eChBrWVOGAFw Pq5D6uc3mncsYQW/tUACTQl5InajSaf0m227B3dZqQHH8VK1t4utEvHeaItIGy/eNepF WAtE5r9R8E3ls/Rkfqq9RtdHncM6YOxTawI3ltdG313PJYEPBBnLAB8nEk65+NItn2uU QjNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YttYJY2hEu0o9ieZzIqW+Sf4nL0+gX4KSVXdg9N5DNU=; b=UP+h9X9hUyVT1gOe5fwD7SFyN6duBR7sAufNORoFEFBUMDQ0cOVsQdBE5P9cuFnzW+ VgAGtoXAGp/p+hMTy8iDGTkVdxg8cYPPb3d4C0m2gFGNHKkeEOwk835QV+6wcLod2ynf 1lVl9L1ncPT8NnCsinTN2z6LtQYON4gGFRIMoMd51y7p4RQAZNN4FarHR+X2NV810kmv C4rme7CzWsfMo3wN4QmMqoWVVfD82H4Zxjr6LGx123Xtx4fG+x3xxI6BhDQR+D5RmvA7 n6jJI53T7jaq/ciY4hkq8oOvr2M70BbulS8LQrJAJBjTOSndVj8KH1DMKU0s86TjVqfB ELug== X-Gm-Message-State: ANhLgQ0OmGGqffaaGdlV/4z9iLz1N/+i+FqUvkaklYAjkxQaZg/kII4q qta4xbIQNY8G8UekiP6aeEk= X-Received: by 2002:a17:902:694b:: with SMTP id k11mr7718361plt.334.1583589493848; Sat, 07 Mar 2020 05:58:13 -0800 (PST) Received: from VM_0_35_centos.localdomain ([150.109.62.251]) by smtp.gmail.com with ESMTPSA id y28sm14694177pgc.69.2020.03.07.05.58.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Mar 2020 05:58:13 -0800 (PST) From: Qiujun Huang To: marcel@holtmann.org Cc: johan.hedberg@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Qiujun Huang Subject: [PATCH] bluetooth/rfcomm: fix ODEBUG bug in rfcomm_dev_ioctl Date: Sat, 7 Mar 2020 21:58:08 +0800 Message-Id: <1583589488-22450-1-git-send-email-hqjagain@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't increase dlc->refcnt. Reported-by: syzbot+4496e82090657320efc6@syzkaller.appspotmail.com Signed-off-by: Qiujun Huang --- net/bluetooth/rfcomm/tty.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 0c7d31c..ea2a1df0 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -414,7 +414,6 @@ static int __rfcomm_create_dev(struct sock *sk, void __user *arg) if (IS_ERR(dlc)) return PTR_ERR(dlc); else if (dlc) { - rfcomm_dlc_put(dlc); return -EBUSY; } dlc = rfcomm_dlc_alloc(GFP_KERNEL); -- 1.8.3.1