Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+be2baed593ea56c6a84c@syzkaller.appspotmail.com
Subject: Re: [PATCH] Bluetooth: add timeout sanity check to hci_inquiry
Date: Thu, 19 Aug 2021 18:09:58 +0300	[thread overview]
Message-ID: <c3e1a8ca-2ded-f992-a1c3-d144397a7b2a@gmail.com> (raw)
In-Reply-To: <0038C6D9-DEAF-4CB2-874C-00F6CEFCF26C@holtmann.org>

On 8/19/21 6:05 PM, Marcel Holtmann wrote:
> Hi Pavel,
> 
>> 	}
>> 
> 
> 	/* Restrict maximum inquiry length to 60 seconds */
> 	if (ir.length > 60) {
> 		..
> 	}
> 
>> +	if (ir.length > HCI_INQUIRY_MAX_TIMEOUT) {
>> +		err = -EINVAL;
>> +		goto done;
>> +	}
>> +
> 
> I found this easier to read than adding anything define somewhere else. And since this is a legacy interface that is no longer used by bluetoothd, this should be fine. We will start to deprecate this eventually.
> 
> And I prefer 1 minute max time here. Just to be safe.
> 

I thought, that user-space should be aware of maximum value, that's why 
I decided to add this define :) I didn't know, that this interface is 
legacy.

Will fix in v2, thank you!


With regards,
Pavel Skripkin

  reply	other threads:[~2021-08-19 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 10:31 Pavel Skripkin
2021-08-19 15:05 ` Marcel Holtmann
2021-08-19 15:09   ` Pavel Skripkin [this message]
2021-08-19 15:15   ` [PATCH v2] " Pavel Skripkin
2021-08-19 15:28     ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2021-08-16 20:00 [syzbot] INFO: task hung in hci_req_sync Pavel Skripkin
2021-08-16 22:39 ` [PATCH] Bluetooth: add timeout sanity check to hci_inquiry kernel test robot
2021-08-16 23:28 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3e1a8ca-2ded-f992-a1c3-d144397a7b2a@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+be2baed593ea56c6a84c@syzkaller.appspotmail.com \
    --subject='Re: [PATCH] Bluetooth: add timeout sanity check to hci_inquiry' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).