linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Manish Mandlik <mmandlik@google.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	ChromeOS Bluetooth Upstreaming 
	<chromeos-bluetooth-upstreaming@chromium.org>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>
Subject: Re: [PATCH v9 3/3] bluetooth: mgmt: Fix sizeof in mgmt_device_found()
Date: Thu, 16 Dec 2021 11:49:49 -0800	[thread overview]
Message-ID: <CABBYNZKaD95hQcGJyUKiBrokbnjD6h4BUhm0cpm7HntVtQOG+A@mail.gmail.com> (raw)
In-Reply-To: <20211216044839.v9.3.If37d23d1dd8b765d8a6c8eca71ac1c29df591565@changeid>

Hi Manish,

On Thu, Dec 16, 2021 at 4:50 AM Manish Mandlik <mmandlik@google.com> wrote:
>
> Use correct sizeof() parameter while allocating skb.
>
> Signed-off-by: Manish Mandlik <mmandlik@google.com>
> ---
>
> (no changes since v8)
>
> Changes in v8:
> - New patch in the series.
>
>  net/bluetooth/mgmt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index c65247b5896c..5fd29bd399f1 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -9709,7 +9709,7 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
>
>         /* Allocate skb. The 5 extra bytes are for the potential CoD field */
>         skb = mgmt_alloc_skb(hdev, MGMT_EV_DEVICE_FOUND,
> -                            sizeof(ev) + eir_len + scan_rsp_len + 5);
> +                            sizeof(*ev) + eir_len + scan_rsp_len + 5);
>         if (!skb)
>                 return;
>
> --
> 2.34.1.173.g76aa8bc2d0-goog

There is already a patch addressing this:

https://patchwork.kernel.org/project/bluetooth/patch/20211213212650.2067066-1-luiz.dentz@gmail.com/

Please use that instead and if that works for you reply adding Tested-by.


-- 
Luiz Augusto von Dentz

  reply	other threads:[~2021-12-16 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 12:49 [PATCH v9 1/3] bluetooth: msft: Handle MSFT Monitor Device Event Manish Mandlik
2021-12-16 12:49 ` [PATCH v9 2/3] bluetooth: mgmt: Add MGMT Adv Monitor Device Found/Lost events Manish Mandlik
2021-12-16 12:49 ` [PATCH v9 3/3] bluetooth: mgmt: Fix sizeof in mgmt_device_found() Manish Mandlik
2021-12-16 19:49   ` Luiz Augusto von Dentz [this message]
2021-12-16 19:35 ` [PATCH v9 1/3] bluetooth: msft: Handle MSFT Monitor Device Event Luiz Augusto von Dentz
2021-12-17  7:17 ` [kbuild] " Dan Carpenter
2021-12-21 21:56   ` Luiz Augusto von Dentz

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=CABBYNZKaD95hQcGJyUKiBrokbnjD6h4BUhm0cpm7HntVtQOG+A@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=davem@davemloft.net \
    --cc=johan.hedberg@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mmandlik@google.com \
    --cc=netdev@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).