Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp252708ima; Tue, 5 Feb 2019 22:36:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IYWy+CIe0vJFY9B8vuqZhXaewZ4DxO+cEGKYSIuMiVX584aaXrlXuDB4dbOx8k00xbeEY/F X-Received: by 2002:a17:902:503:: with SMTP id 3mr9242736plf.233.1549434968003; Tue, 05 Feb 2019 22:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549434967; cv=none; d=google.com; s=arc-20160816; b=gHvsT9qyGotKJGcIBFPvYHyupXLZInRj4Za87k6g62/rZQ66RKHifwGV4AjlTpEaLg PydIv2zSsRSN5JmdCAbSfjIHh5swiQd9pGwEjRwGNRbH+4yD5lJnwGVvQw3B3eUl8eqK wL4sPpMmtP2c89/Mi502uEMST/bPvHfbrjMc6cIRQ1LaCm3jf8c0+ZgrT/UFp4CvtE6/ 96uOQ3RRdwwTiIkuewzyF3zY12IO+EYTSfSuY3RCxBshR8K5v4gnT0HBi3oomhirypwy khP4YE4eGkbk6dgw527KlYqSF8Ew1OvOgbqeavQg1A0XXdNlkfQ9Pup1d+pw9VmG/b4c stnQ== 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:dkim-signature; bh=Qu0XbiKv4CghM/9Kor6hUhvTCrbLkpnmY23QKJgYX6c=; b=UVzp0a+k9nZCfD8D1toi3P/HBuvc77E6bulemlyUkTB9vyDNVOXTS9wKh8N/YwMt0S G4IOfYREqKozp91htI0NLY9lslZ//xjXzn8ZKyQVlvwZGlya9pxOg04wu8Ypaj4+AR0Y MihDQVdJ2FLlcUuFEjlTC8D+4c7Y5fA6/iNchRhmUm/3pz6pKJuIPylDfayutm/aNDFh oOTW7f1zfizQiZdhnfSoDxUcuOhNe5tKZXfFIepMFZv3P0VUZHJXyEsN9GVFai0cQZ1f IpQ++WHCrtXHbbJha0u7o+ZDLg2nLogMhdg+I4ifi8ndtmNM/1AbhHhoZGBjSvte6zdS y53Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Trd6DY+2; 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 t13si1503460pgm.175.2019.02.05.22.35.51; Tue, 05 Feb 2019 22:36:07 -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=Trd6DY+2; 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 S1727272AbfBFGfj (ORCPT + 99 others); Wed, 6 Feb 2019 01:35:39 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44210 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725897AbfBFGfj (ORCPT ); Wed, 6 Feb 2019 01:35:39 -0500 Received: by mail-pl1-f193.google.com with SMTP id p4so2656405plq.11; Tue, 05 Feb 2019 22:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Qu0XbiKv4CghM/9Kor6hUhvTCrbLkpnmY23QKJgYX6c=; b=Trd6DY+25rI9LIo82JhBvb34aAxQeBqu2jBD8Xn4NDyHJvTfx4lOsPrbuE+sY6al6K QsTe0swBNDVDVDFc2HPglZXbyZuWbZJBigNnVRcnJb7FdiOUkoWYAGCjAYfk0z+ch6nq nH0MqYTGplIRBdruoSGOMVzktBJQnXxZXxunY9BpVBRSzBciYMuuaBUrsp8KS4JnwpAi czq8DARsU4CokDkMjmHLFINvYhAUjqSzHoQnzcKb9wHf5YZQCR+HEniydHJ1c7rRSA47 90Pqfa6VijwctOcUHtvAuZd7zwD2C+fmw+ANbZXhEkavoNogr+1MTK10HoiKrJgfsvFx oDWg== 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=Qu0XbiKv4CghM/9Kor6hUhvTCrbLkpnmY23QKJgYX6c=; b=eSaWzxVNJuVQQSsAwFnc6g5EcM0oaLH9YHrJyED7IhNTKDl1wBExRQQkPSDjU/bTnH wtw0fdfT9QVj+Syw8JNqWtrp0p3g3N4p1mdQ3jAaUB7mLRCA2Q9Up5gakJuOjhZZFeNb FnVad7Mcn13FBMqpGvA+9gs9PvuZLV+r8xtQCAXDLpiCIxrBaQFhmCsiWEwwOFmahPEj BWs0TjV1mkXqao0GZjrnXj4IBhi0Q/LwT62NHYsTXRvjhYpYVvlAGfoCPEF6+e2i/hjk GOf/W4/HMeDKm+/WBtFjvGn2H03RlfMeWUfwiiwC6zroQ9bxiM+aj48kuvfN9ia0VbSs 7Mrw== X-Gm-Message-State: AHQUAuas6lwRUw5alIbPwM7pCBc/q89pgccFIz5msS4GWPZIZ8bHAb9u kWBtZ+0aIVjS4Wj0S2t5gr0= X-Received: by 2002:a17:902:e98f:: with SMTP id ct15mr9013133plb.273.1549434938281; Tue, 05 Feb 2019 22:35:38 -0800 (PST) Received: from myunghoj-Precision-5530 (cpe-76-176-3-80.san.res.rr.com. [76.176.3.80]) by smtp.gmail.com with ESMTPSA id t67sm12377320pfd.90.2019.02.05.22.35.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Feb 2019 22:35:37 -0800 (PST) Date: Tue, 5 Feb 2019 22:35:35 -0800 From: Myungho Jung To: Marcel Holtmann Cc: Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/2] Bluetooth: Add NULL check for tiocmget() and tiocmset() Message-ID: <20190206063533.GA7402@myunghoj-Precision-5530> References: <0D421861-FCD6-4AFF-8A0F-DBEE520DB64B@holtmann.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0D421861-FCD6-4AFF-8A0F-DBEE520DB64B@holtmann.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 05, 2019 at 02:55:50PM +0100, Marcel Holtmann wrote: > 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 > Hi Marcel, Are the operations required on any HCI UART drivers? For now, I found only 5 drivers (ath, bcm, intel, mrvl, and qca) are explicitly calling them. So, I'm not sure whether it breaks any existing code with other drivers if returning error in open(). Thanks, Myungho