Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3562123ima; Mon, 4 Feb 2019 01:07:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN4+bii3b/JyEFB2apGIp6CtJ0BJ9tC0XhpbWFB0czRb50eGUUfYOhg0I2c98cknhUpRMz+l X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr48157499plq.275.1549271231284; Mon, 04 Feb 2019 01:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549271231; cv=none; d=google.com; s=arc-20160816; b=orEja7X4aQZmG+FsB37lSpf2KiMaI8HjJKyf5Az1UUEpV6E9UWrgVqPstVLkvBQofd +Xl68zN1l7jKJWRb0HswZ3H97CleD3uNGkAykHUuvhVWS458lNJ0CsHJeb0JcSsJ6ifr PlC4K6shxVs9cnhZW48GrUmLLK/2OtObyUcg7rxfnw9vxFmlEsskFDqvDP33llb2moPO Bu+KTafbcf2E24HoMabcQQUPzkmK8rTFdLEMsQjz8y3C4vJ6htcyV70F7YIyEHNxc+kA VJKkVSNzQ2VmzNyu4Q/ReSlb2N5eK9CsVu2aTRCr5IIyT6HP7OeZg4ILmQhX1T6Pgya4 DULg== 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=5IP7Gd0b96kdpx0TlmqHyk1FdgDMn+M7irorCckpmZI=; b=MBOFBLp4jQSt5e4a6smjaLlP4outsIuGsVQL1yNDib+q8ZTogFRMEZq9GDyAWdsYHG USK/Bc/1SOzOq4agxfeVVXSJ4AlqRF5Y528bAGpqhojAN+x3D6HB/8vwhcIUwVETxnm6 q7ZBenzexcEGw/p1+I18v7auMyCnB/f84MbsB+O8QVK7MQ8UbqQBhjUX03XNipo+fz2T UUyeiIOWROQgZKZ8+DLjH/g3fyh6od8eVAXvAZa5KtAOhoviV042eiU1qwFxOmxmh27R BJfpFJbc042MZlbbtnJmWSnmYFFPXl2n3UsJ1FC/84U4/Cu/aguY4WUL7zAj4qRleQ1R q7DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qbgvMyei; 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 w16si14542962pga.328.2019.02.04.01.06.53; Mon, 04 Feb 2019 01:07:11 -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=qbgvMyei; 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 S1728955AbfBDJEl (ORCPT + 99 others); Mon, 4 Feb 2019 04:04:41 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36742 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbfBDJEl (ORCPT ); Mon, 4 Feb 2019 04:04:41 -0500 Received: by mail-pl1-f195.google.com with SMTP id g9so6516037plo.3; Mon, 04 Feb 2019 01:04:41 -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=5IP7Gd0b96kdpx0TlmqHyk1FdgDMn+M7irorCckpmZI=; b=qbgvMyeifCYzxL0u/gL8WoJt5cvt7v6hNjgfAyuMLBEcXH3tBUvH4i1ZaZYr889AFT 0PVi8D/Bm0fT24RIpxcbCMKHT05a8eMbYzCt1ZOqr27gPoKWGiQ153SyogOddYV7oSGo 5iWK2pVfBR8jnv1uDRYTClOxxcZYihVjMoMPCskJ53tD+UUrokY2YCZSgwjZuY2succ7 dXRRENZrpF9xl1N4DbYj3o8zcvoD1/lAy5CejYHOav08ODsNntHgcteA1urOGjTZzOHP GnYtjRXyP7nNdO45GgGuZiZGc7wI7Z2vVC2Si3HtN603kJCG/b14GbS5U7cexFUpiohr U7zw== 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=5IP7Gd0b96kdpx0TlmqHyk1FdgDMn+M7irorCckpmZI=; b=jNwnRahww86zG0xkGLSbT7fr/ArzuDUQ+ySQXJ0pGBwRfNtraRipEPuajEnbA7Z7rm rtV7c+AJJH2MW6NX7vAEW5tIn259jb/803VeOa9R5NfRxlAto/F/eoZhN91WSWhIALK3 JU4kmxEDk7v1DZXWwU28zy3X2Je1Psk6rUG5q9h65LRGJe3bECi/QTj3OgWGR/aJZBTd BA0AJjuZ98jL4P7K0e/TbUDdqiixiPNcpXATGBsTvJWurrwqGclDYPZ1J401JZeQnrMI ISU3V1dLCkLTGWC2wZtet7rIuJC8PdRgpQWoTHlGHLB6w4k9an+u9Hz8hylSXLlO5FmL +LJw== X-Gm-Message-State: AJcUukfBlhsDaZXUuCxr/aokaDcCZBPkfJ1J6EduWZzpPenbnvG5RsIJ QNBsdcPHO4koEaRYeN2cVp4= X-Received: by 2002:a17:902:9a47:: with SMTP id x7mr50355304plv.126.1549271080665; Mon, 04 Feb 2019 01:04:40 -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 m20sm18077329pgv.93.2019.02.04.01.04.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 01:04:40 -0800 (PST) Date: Mon, 4 Feb 2019 01:04:37 -0800 From: Myungho Jung To: Johan Hovold Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Bluetooth: Add NULL check for tiocmget() and tiocmset() Message-ID: <20190204090436.GA3711@myunghoj-Precision-5530> References: <20190130053925.GA26699@myunghoj-Precision-5530> <20190131154000.GU3691@localhost> <20190203063823.GA8228@myunghoj-Precision-5530> <20190203105323.GA4686@localhost> <20190204072859.nrglf7pfj42itzh5@myunghoj-Precision-5530> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190204072859.nrglf7pfj42itzh5@myunghoj-Precision-5530> 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 Sun, Feb 03, 2019 at 11:29:00PM -0800, Myungho Jung wrote: > On Sun, Feb 03, 2019 at 11:53:23AM +0100, Johan Hovold wrote: > > On Sat, Feb 02, 2019 at 10:38:24PM -0800, Myungho Jung wrote: > > > On Thu, Jan 31, 2019 at 04:40:00PM +0100, Johan Hovold wrote: > > > > On Tue, Jan 29, 2019 at 09:39:28PM -0800, Myungho Jung wrote: > > > > > tiocmget() and tiocmset() operations are optional and some tty drivers > > > > > like pty miss the operations. We need NULL check to prevent from > > > > > dereference. > > > > > > > > > > Signed-off-by: Myungho Jung > > > > > --- > > > > > drivers/bluetooth/hci_ath.c | 6 ++++++ > > > > > drivers/bluetooth/hci_ldisc.c | 4 ++++ > > > > > 2 files changed, 10 insertions(+) > > > > > > > > Ah, you had already submitted a v2. > > > > > > > > I still suggest splitting this one in two patches and that you add a > > > > Fixes and stable tag to each so that they both get backported to stable. > > > > > > > > Also, when resubmitting, make sure to include a short changelog here > > > > below the cut-off line (---). > > > > > > > > > > > > > > diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c > > > > > index d568fbd94d6c..fb9f6323a911 100644 > > > > > --- a/drivers/bluetooth/hci_ath.c > > > > > +++ b/drivers/bluetooth/hci_ath.c > > > > > @@ -185,8 +185,14 @@ static int ath_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) > > > > > > > > > > static int ath_setup(struct hci_uart *hu) > > > > > { > > > > > + struct tty_struct *tty = hu->tty; > > > > > + > > > > > BT_DBG("hu %p", hu); > > > > > > > > > > + /* tty driver should support operations to set RTS */ > > > > > + if (!tty->driver->ops->tiocmget || !tty->driver->ops->tiocmset) > > > > > + return -EOPNOTSUPP; > > > > > > > > -ENODEV might be more appropriate. > > > > > > > > Johan > > > > > > I'll split into 2 seperate patches. So, do I need to add stable tag on each > > > patch like below to be cherry-picked? > > > > > > Cc: # : > > > > > > I looked for a good example from mailing list but didn't find one. > > > > Almost right, the format you use above is actually used to identify > > dependencies for backports. > > > > You should add a Fixes tag identifying the commit which introduced each > > bug and a stable-cc tag. If you want you can indicate the version after > > a # sign, but that can also be inferred from the fixes tag. > > > > For the hci_ldisc fix I think the tags would be: > > > > Fixes: 2a973dfada2b ("Bluetooth: hci_uart: Add new line discipline enhancements") > > Cc: stable # 4.2 > > > > You can use git blame to track down the offending commits. > > > > This should all be explained here: > > > > https://www.kernel.org/doc/html/latest/process/submitting-patches.html > > > > Johan > > Thank you for the explanation. I'll carefully read the page and submit the next > patch. > > Thanks, > Myungho Hi Johan, I have one more question. The title of new patches should be version 3 like this? [PATCH v3] Bluetooth: hci_ath: ... [PATCH v3] Bluetooth: hci_ldisc: ... Or newly start with [PATCH]? Thanks, Myungho