From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD159C4332F for ; Wed, 2 Nov 2022 10:28:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbiKBK2m (ORCPT ); Wed, 2 Nov 2022 06:28:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbiKBK2l (ORCPT ); Wed, 2 Nov 2022 06:28:41 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58EE31EA for ; Wed, 2 Nov 2022 03:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1667384914; s=strato-dkim-0002; d=hartkopp.net; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=hOoU3pkO3rmhPzBFg7OMbk4A+jVbwc8a8pbkWVyHeOQ=; b=CHYsjdaFn0GBP+dg1ObbLMZHGMps8+M6vxxzE7xGDUMAJSWKLqb98w/BQIS23NxJtD JOLxQ2iskksXNzOyQ7nYH18VFbPVqznAnKD8zukARrEduZjDk1SeCCDLQHpUCMgFPjk6 ruloWi3d5yOOfdaPhLGC4gwVFU1LdTkL++QQDM98QjuFQUTPnm+JZ0EDvd+vMCHpLF7J h4pssPwdVRWqloK86muJHzsrz8JhzVQH0iQCxsrk4CO0Q7tdfjmFDyigj8cZHjWt7DAH xsZuzx5oE/d8SsTDrzPPEDuZpvnLXRKKyTfaPbQxAVFWJcshZ2zK0dsdCttT+cX8cr8K vM/g== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrDxb8mjG14FZxedJy6qgO1qCHSa1GLptZHusx3hdIrpKytJSr6hfz3Vg==" X-RZG-CLASS-ID: mo00 Received: from [IPV6:2a00:6020:1cfd:d100::923] by smtp.strato.de (RZmta 48.2.1 AUTH) with ESMTPSA id Dde783yA2ASXIyg (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 2 Nov 2022 11:28:33 +0100 (CET) Message-ID: Date: Wed, 2 Nov 2022 11:28:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] can: dev: fix skb drop check To: Vincent MAILHOL Cc: linux-can@vger.kernel.org, Dariusz Stojaczyk , Max Staudt References: <20221102095431.36831-1-socketcan@hartkopp.net> Content-Language: en-US From: Oliver Hartkopp In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org On 02.11.22 11:17, Vincent MAILHOL wrote: > On Wed. 2 Nov. 2022 at19:06, Oliver Hartkopp wrote: >> In commit a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") the >> priv->ctrlmode element is read even on virtual CAN interfaces that do not >> create the struct can_priv at startup. This out-of-bounds read may lead to >> CAN frame drops for virtual CAN interfaces like vcan and vxcan. >> >> This patch mainly reverts the original commit and adds a new helper for CAN >> interface drivers that provide the required information in struct can_priv. >> >> Fixes: a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") >> Reported-by: Dariusz Stojaczyk >> Cc: Vincent Mailhol >> Cc: Max Staudt >> Signed-off-by: Oliver Hartkopp > > Cross fire... I missed your patch and sent another one. That said: > > Acked-by: Vincent Mailhol > > Thank you! :-D Yes! I would be fine with both of them. The main difference is the naming and the inline implementation. So let us Marc decide ;-) Acked-by: Oliver Hartkopp Btw. my patch is missing the pch_can driver change which was already removed in net-next. Best regards, Oliver