Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp558634imi; Fri, 22 Jul 2022 05:00:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vm3ZPN9nCu7Ljvm6mF6K7YD7+jj8Y423XKAw0tR7CqXQ90IoAtjWH0Q9ZUZcTI0M79VRwk X-Received: by 2002:a05:6402:4016:b0:43a:f310:9522 with SMTP id d22-20020a056402401600b0043af3109522mr298875eda.200.1658491242376; Fri, 22 Jul 2022 05:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658491242; cv=none; d=google.com; s=arc-20160816; b=X33RjxT0N2xCgetwmX/0tolld0w/JC+Li02YlZ+7IF2ZU7Uwi5+69iTJ4b0Tco8o6Y njdULj/CsqsQ1yLDmaKl+yffR95qS4hl2JGloiWdIUpfIZja/q/jS9BL7mlKl4LLi8MV /UDnbAr90GN0XSH6IgQaIVV/kqkc8DsjAdikP2lOioucrgSADZDTeIJyuQ5DmlYdk6PZ kd6W/b2EjeMpgeiLrXg9R/TiGplBwe1kxvgPqAgiUjmcS96tW4glQ+gXxfgcAosf1u1D 7c0b0VMqkE/zlodI0o0ZAQ1A0S9RnqMGGRVz5sfCQAfSq+ooWN8nkwRDUcB2UV5AzmE1 szAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=laHSajeLwNiFWAExVwDs2giJngGTbAiKrPBfo9IFyFE=; b=zAJk/8pl3hXvdKLxuMPxuU8zUo7wD+WignVUQotrFEqRSusUuN/y/J727iwPM436Kt daWuKrBIWndNZkQC/p2nbj/mobDmTQawoKO0HdmsqM8CA3G4GiKdIQQ3umMDyyNLkjYa SMJywEWgYoc6PWo6OOY4TjBJWByLQqP2MtCFmaobjkI8aBZ65zcS7tTdeSaepjgG9Wdm CAoupGKH8suHDSP7MOkukCqPNy8JyeeIJfv1t9nW5Hlh/16KiIJ7kcHXvDQz/xZPBpKu 6Q1lYrYNLJnyq5icb+/jBE2219lA6Nwx8Mk7V6JgaNTiYXKOYT5OCy6vnhzpqLgQf+Tg J3Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w14-20020a056402268e00b0043ab4c9f831si6401533edd.26.2022.07.22.05.00.16; Fri, 22 Jul 2022 05:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiGVL7u (ORCPT + 99 others); Fri, 22 Jul 2022 07:59:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbiGVL7t (ORCPT ); Fri, 22 Jul 2022 07:59:49 -0400 Received: from giacobini.uberspace.de (giacobini.uberspace.de [185.26.156.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F2849D1D6 for ; Fri, 22 Jul 2022 04:59:47 -0700 (PDT) Received: (qmail 13189 invoked by uid 990); 22 Jul 2022 11:59:45 -0000 Authentication-Results: giacobini.uberspace.de; auth=pass (plain) Message-ID: <67219c6e-7eef-ee5c-693c-215a4d4c1b3e@eknoes.de> Date: Fri, 22 Jul 2022 13:59:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Bluetooth: virtio_bt: Use skb_put to set length Content-Language: en-US To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org References: <20220614145253.132230-1-soenke.huster@eknoes.de> From: =?UTF-8?Q?S=c3=b6nke_Huster?= In-Reply-To: <20220614145253.132230-1-soenke.huster@eknoes.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Bar: - X-Rspamd-Report: MIME_GOOD(-0.1) BAYES_HAM(-2.93036) SUSPICIOUS_RECIPS(1.5) X-Rspamd-Score: -1.53036 Received: from unknown (HELO unkown) (::1) by giacobini.uberspace.de (Haraka/2.8.28) with ESMTPSA; Fri, 22 Jul 2022 13:59:45 +0200 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, MSGID_FROM_MTA_HEADER,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On 14.06.22 16:52, Soenke Huster wrote: > By using skb_put we ensure that skb->tail is set > correctly. Currently, skb->tail is always zero, which > leads to errors, such as the following page fault in > rfcomm_recv_frame: > > BUG: unable to handle page fault for address: ffffed1021de29ff > #PF: supervisor read access in kernel mode > #PF: error_code(0x0000) - not-present page > RIP: 0010:rfcomm_run+0x831/0x4040 (net/bluetooth/rfcomm/core.c:1751) > > Signed-off-by: Soenke Huster > --- > drivers/bluetooth/virtio_bt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c > index 67c21263f9e0..fd281d439505 100644 > --- a/drivers/bluetooth/virtio_bt.c > +++ b/drivers/bluetooth/virtio_bt.c > @@ -219,7 +219,7 @@ static void virtbt_rx_work(struct work_struct *work) > if (!skb) > return; > > - skb->len = len; > + skb_put(skb, len); > virtbt_rx_handle(vbt, skb); > > if (virtbt_add_inbuf(vbt) < 0) Are there any issues with it, or is there another reason why it is not merged yet?