Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1276333rdb; Wed, 6 Dec 2023 13:53:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiMG031Gefx1kwaLP5hWPLFHu803nI59zTlPVNAjYyjKxY7h5BRcsZIksAr1N8/vYwJX1K X-Received: by 2002:a17:902:f690:b0:1d0:94f8:ab1e with SMTP id l16-20020a170902f69000b001d094f8ab1emr1515690plg.83.1701899605767; Wed, 06 Dec 2023 13:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701899605; cv=none; d=google.com; s=arc-20160816; b=T0cofpWm7wSPcWUF+MaUcjjrBpR9yx6/D53nnwX/xjDvzxdb8CcRyMtzU7tXbUSO9g c+cGz1Dq66OiabrPii5QwbyzRG8xWjXgmp6jK/H9qLSwXKPlPfgNIZ6fcHXzjsnx0xm/ /uRNXIgcSpiFNunmyL9KIzkGPPmjuvBOWipNv3uTg42UuZmVXps9XmnV76ned3rzqgOJ TPR2m5XtfVFwUucU2jq4d9ij88rIqPcZg/RfRbMrZmJoQGM+/+f6SaFg7gGjaD5qpNo2 jcAUpnyyp8ADJMIM/CvpkiKqQgOokZLs+rg3xkMT1FRPZjV+lBqyht9UVQpZaaCXtBuG IBzg== 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:dkim-signature; bh=SRsmCfZPRNHAmp69hbxA4nNZpGMatj3IE3IFRot8VPk=; fh=4YQMWG7PPpdb3An8RhvZj8DtztoPSWU25f42k80m9ec=; b=fJehKZGIQ2DTIWpYP45ASaV1qg493oxSy5HLPJ0Dly/c/ENjbvifgZz/ZMIUyeRPNI FE0mvxV4ZovrCq99Cb7R4GUSMufqwakyMrqSh3pWaUgy3rbN5MPt1XNbhjvCOr4EKl/c bU4sKtgtK8oxuWWb0ZYrzuMaLmOLhlR2YKmFWdPQcnLoNcJRK0XK/9ACDP7s1QYzKNzA mgu/nPJHEN8UDn7N7R4Vtt7TZqdN2b7Z4V1Ft9Ndb/599l6UEi4N4ZT1LbEuvyvPH9vW rWWpPlDkG/xKC5qBqYMpjgbRf826OIe/oAe+I28O9qMUUJ1bJcN6ayutaL2nAlD0g8ph riIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zs8JIsig; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id w9-20020a1709026f0900b001d087d08161si433015plk.32.2023.12.06.13.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:53:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zs8JIsig; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6BDF3826FA94; Wed, 6 Dec 2023 13:53:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377325AbjLFVxG (ORCPT + 99 others); Wed, 6 Dec 2023 16:53:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377418AbjLFVxF (ORCPT ); Wed, 6 Dec 2023 16:53:05 -0500 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6301D5B; Wed, 6 Dec 2023 13:53:11 -0800 (PST) Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-67adea83ea6so1971716d6.0; Wed, 06 Dec 2023 13:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701899590; x=1702504390; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SRsmCfZPRNHAmp69hbxA4nNZpGMatj3IE3IFRot8VPk=; b=Zs8JIsigjf0aghaaFTbbW2vZmB0WxAUBZVsOKJ6ZwzFvjWhVeakpf8Ngce7sdKg8Ic 76zn+tdvlwxMQEVdrDtQSz9pSU1jGMntBAQWv1uoQTCMdaTHQRUwZTmWoV+mklJekQrV i/d7eZqsnF8acFXNPFIOi7Vf3Dzx8MxSe6k5xlUo2mC6DUkK6Gx4tZTV42nFfsaOs2ZA Egzp9V9uy+i21y0S3X0OYO0XgZnTAalkw2L5VG7pucsqEy3n3EsUTYN4AlrQnjaIL3Ib VO435BluLvnnXY8cLNsTHTwCYp3YGEZA5c3NX0oBvzjulGgVAQSSY5CDRGXAKLNDt3e/ Dq4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701899590; x=1702504390; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SRsmCfZPRNHAmp69hbxA4nNZpGMatj3IE3IFRot8VPk=; b=hyY4D7rPk7Vjypsh3pATc9W9Jc1e4xc1djA4B+oCRsUUhIU/+/rgwPQ6pq9cZSakO7 GQ0A1Mt5SxHMVYjWlAWqksQCkBdcsa556/Dq3hFoMSOEiYbMI6yJhNmfggQaTTIrRcBR 9ZSa8NVmVHHae1xNF7ubaHDLZYo6X4Af8/zVvaoP2YXPWZ+ySejHWXrO0bg47vi/ARzR Ld/uVp7jrmKbsTOc6qM4E7fyVp6HqMCtXd9wOLlJbNVljWOawurXg+x2qtPpIrTsU2Ao V7X061YxGUHjQrZbNNyesjwQDJdDzJ6l8ivsdSODHxd6HbSMzmsYZMwXStEHM2/4VzB4 VQ3A== X-Gm-Message-State: AOJu0YzVdP4pE0hqvc/hM2AIIZlG5J/N9JdLxo/sfNbkk8S8Q8thzvuB 0H4+GAtqOELGx9ywv0nCFCY= X-Received: by 2002:ad4:51c7:0:b0:67a:db17:c736 with SMTP id p7-20020ad451c7000000b0067adb17c736mr1656907qvq.62.1701899590481; Wed, 06 Dec 2023 13:53:10 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id k1-20020a056214102100b0067abfe5709dsm292192qvr.139.2023.12.06.13.53.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Dec 2023 13:53:09 -0800 (PST) Message-ID: Date: Wed, 6 Dec 2023 13:53:06 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 net] net: dsa: microchip: provide a list of valid protocols for xmit handler Content-Language: en-US To: Sean Nyekjaer , Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Arun Ramadoss , Christian Eggers Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231206071655.1626479-1-sean@geanix.com> From: Florian Fainelli In-Reply-To: <20231206071655.1626479-1-sean@geanix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 13:53:23 -0800 (PST) On 12/5/23 23:16, Sean Nyekjaer wrote: > Provide a list of valid protocols for which the driver will provide > it's deferred xmit handler. > > When using DSA_TAG_PROTO_KSZ8795 protocol, it does not provide a > "connect" method, therefor ksz_connect() is not allocating ksz_tagger_data. > > This avoids the following null pointer dereference: > ksz_connect_tag_protocol from dsa_register_switch+0x9ac/0xee0 > dsa_register_switch from ksz_switch_register+0x65c/0x828 > ksz_switch_register from ksz_spi_probe+0x11c/0x168 > ksz_spi_probe from spi_probe+0x84/0xa8 > spi_probe from really_probe+0xc8/0x2d8 > > Fixes: ab32f56a4100 ("net: dsa: microchip: ptp: add packet transmission timestamping") > Signed-off-by: Sean Nyekjaer Reviewed-by: Florian Fainelli -- Florian