Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5699190imu; Wed, 30 Jan 2019 02:00:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5TEXonJ7TMHFRqPyuXWnPQZf7N4jaB6wUxrfp0HBj3QOMm9Gk0kQUYy/azb1jK+W59rcNA X-Received: by 2002:a17:902:32c3:: with SMTP id z61mr29630702plb.114.1548842451297; Wed, 30 Jan 2019 02:00:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548842451; cv=none; d=google.com; s=arc-20160816; b=zzt77VhvjP6d0OwPT8r6BGJts8qI769H4oiROnoJU1HjsjAyxuhnoPTDASfnAB6JxV 1emPNx/SWDBYVQrHSq/NtW0P7kPZpeWdMwU70GO36K5jLQoO1CZen6zLZtDJGYtQWUdl 9VU6sprz4BChR94OErtMBAjM1nHNG1KOpOg7f4ZVO/XpMvpThxAPdmUVuC3IyU+cL48P /Hr6OZ3LfU6RGPx4d4+hYCoMV2YxSuS4Vi5mffHj1Q0QTKQAGbAaLiJH2QZr6XtQDBHK 1gQ2+4+XOfsbw0q2XsBFKsaq9eYw5YNtd0suJ1XMw1MbiT64kD8Jr+btPqdojh93azOc HaBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a5XBY6xj9+zxrACI0GDVmm78XUqLrekfPbtv6zRYzPY=; b=GT6q4US6jmin/ZZe2o8s5S2PfwNy19DUeVxZJ+31ra3yTgdEA5noJwyekNPtimGmtu e+xQPn9NDwjA3H20V0VLsyr9Jxy+tIERG5oeCV9Yc72psQh613Pixd+S0j9Zn2lQMe+c KjxXCEHWt/zSnNJDmgp35qv5MoTdS1A8W7tx+uBtpW+AqWaWa7VdpmINCfmkfFt1Lua3 u2zl/k2XEghVTXNJ74j9sPDceyA2pVX4OLhucSvxlTp0Ig2VTCSg1uKJL9SZsXDlPgp4 Avwo7ityXOewIEmvgohNSVoxBobr4jsNCmgsA/nLCYsf4iWtqNbi5XMniHckNPHZFi6h X0yQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si1008726pgr.133.2019.01.30.02.00.35; Wed, 30 Jan 2019 02:00:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730643AbfA3J7p (ORCPT + 99 others); Wed, 30 Jan 2019 04:59:45 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46124 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfA3J7p (ORCPT ); Wed, 30 Jan 2019 04:59:45 -0500 Received: by mail-lf1-f66.google.com with SMTP id f5so16880226lfc.13; Wed, 30 Jan 2019 01:59:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=a5XBY6xj9+zxrACI0GDVmm78XUqLrekfPbtv6zRYzPY=; b=MWygwd0NH3PNfcE0+qmFED6CHe7R/VUwj1+dhgC9zwDutuIur4eWOK/4hahpo+5uRK yxl4fvxop7IydoQEzjIfmmTKZKVqmweTmIP7ooGXCAKU9Me+uvwhZqlka07jTP2/8K+u 6UjaJUF8Ltj4cL2CD3ae3bq+flej1V/gJTbwKHm4p9vyd/RHzFfy0HQF4Hgcf8pYGiqH BUAcAfMeBAU8jEZIFp6/LyJxmnNiZBKQxz15+yP3A1ZKZreS6okUp7WRO4e479hN+mPo H7QZSAiPpRYtt6HBfoxBOhrNkGrvIjhGAXJ8OnKyec112cbH/OijnWNId+fokJSB0JRR zCew== X-Gm-Message-State: AJcUukdh//h/2BifGz/bdGWlJW3q82XEChk3IRaSVXJV5Y5kncW5yv9Y eSlMlzJ/YLQFxkrsui3Eb9M= X-Received: by 2002:a19:5d42:: with SMTP id p2mr22616773lfj.83.1548842382909; Wed, 30 Jan 2019 01:59:42 -0800 (PST) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id f20-v6sm193942ljk.33.2019.01.30.01.59.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jan 2019 01:59:42 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1gomeg-0001Bf-CS; Wed, 30 Jan 2019 10:59:38 +0100 Date: Wed, 30 Jan 2019 10:59:38 +0100 From: Johan Hovold To: Myungho Jung Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Bluetooth: Add NULL check for tiocmget() and tiocmset() Message-ID: <20190130095938.GP3691@localhost> References: <20190128065910.GA14959@myunghoj-Precision-5530> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128065910.GA14959@myunghoj-Precision-5530> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 27, 2019 at 10:59:13PM -0800, Myungho Jung wrote: > tiocmget() and tiocmset() operations are optional and some tty drivers > like pty miss the operations. We need NULL check before referencing > them. Good catch. I suggest splitting these fixes in two separate patches (after addressing Marcel's comments). Don't forget to CC stable and add a Fixes-tag for each, as we we want to have this backported to stable. > Reported-by: syzbot+a950165cbb86bdd023a4@syzkaller.appspotmail.com Actually, these two bugs were never reported by sysbot AFAIKT so no need to give credit to anyone else here. > Signed-off-by: Myungho Jung > --- > drivers/bluetooth/hci_ath.c | 13 ++++++++----- > drivers/bluetooth/hci_ldisc.c | 5 +++++ > 2 files changed, 13 insertions(+), 5 deletions(-) Johan