Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5064552ima; Tue, 5 Feb 2019 05:56:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IbAzmQ/GP2layVi5lwusN4BStzL60OQZeMZ8hq2skzTLUj58XnHHZ7UrLnAov9vzJbSFHVp X-Received: by 2002:a17:902:1745:: with SMTP id i63mr5169411pli.145.1549374999415; Tue, 05 Feb 2019 05:56:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549374999; cv=none; d=google.com; s=arc-20160816; b=oI1qcZ3RqN52ZoGig64ybz2J2JHVV48rc0uZOco9A1oijIk1Tt6kUdplnG1SqYwUnC USCofZ7OPP7z68v+2M/YdhcRJmqTeSDLf/T+Td2JzwUUr4R18PXXLsgL2Ixw91NHfwtQ 7lBzIx/F16Vfck9Xeca34zvZymBBPoQZwY5NQdQb2+BGHn891Vo8twjOyg2dNcexFxJF ejCIfPEZ7UEmdjslncYpip6hDBHLo+cAYWFeFo96n8TdU58LMajIhs7DJ1ZD2K5nXs3x VnZH3wrdLFYGOCTghqzja+UJLMs3wvoDq0Ab2tYpjV5YRv+NoCXUSyvT/YWPJkcDz71N wPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=3j50ooTF8a70zauEkOQNUvypSssIaOEq1WEG269wYK8=; b=P+XyJjy/jvLaVNkmzM3XLQNinphDMtruEF+fVwPWKxQl5WjZdWHbYIM8o+GTMGuDWK mmZ2FYDI9viDqnnwL5rTJcVmm57q38ejBr8ZDZyfSMUODBZcYRpqtJs8iNlNLuM7C1Xh UDu2EdGBvKHsntG0HPOS9SfCTcwdoNpPTy6C6qUv2iy5XVcNhLUxKseUbNUBhdM7Uctw LcJdUbiDPfexVWmtMkA69JRInw0qVd0vuhZVrLo3xRcP5RQ4d3y646AOflSwilf3s+ui EgC1ybdqByv4ZEaUXa7/Jr80+2IuN+gdVsfPbMqUQGmlECVwV5ZY+qidtPWUNiEH7qWw nWFQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si3039164pgv.123.2019.02.05.05.56.23; Tue, 05 Feb 2019 05:56:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729155AbfBENzx (ORCPT + 99 others); Tue, 5 Feb 2019 08:55:53 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:34410 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbfBENzw (ORCPT ); Tue, 5 Feb 2019 08:55:52 -0500 Received: from marcel-macpro.fritz.box (p4FF9FD60.dip0.t-ipconnect.de [79.249.253.96]) by mail.holtmann.org (Postfix) with ESMTPSA id B5495CF26A; Tue, 5 Feb 2019 15:03:40 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: [PATCH v3 0/2] Bluetooth: Add NULL check for tiocmget() and tiocmset() From: Marcel Holtmann In-Reply-To: Date: Tue, 5 Feb 2019 14:55:50 +0100 Cc: Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <0D421861-FCD6-4AFF-8A0F-DBEE520DB64B@holtmann.org> References: To: Myungho Jung X-Mailer: Apple Mail (2.3445.102.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Myungho, > tiocmget() and tiocmset() operations are optional and some tty drivers > like pty miss the operations. Add NULL checks to prevent from > dereference. > > Myungho Jung (2): > Bluetooth: hci_ath: Add NULL check for tiocmget() and tiocmset() in > ath_setup() > Bluetooth: hci_ldisc: Add NULL check for tiocmget() and tiocmset() in > hci_uart_set_flow_control() > > drivers/bluetooth/hci_ath.c | 6 ++++++ > drivers/bluetooth/hci_ldisc.c | 4 ++++ > 2 files changed, 10 insertions(+) why are we not enforcing the availability of these in the hci_uart_tty_open? Regards Marcel