Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4435504pxb; Mon, 21 Feb 2022 21:32:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHR8uiRD9c2KS/F2CBO1ErhbHJp88RISd80265WujXt0UtGHfdVy4spDnWjx8hthL+yUKf X-Received: by 2002:a17:90a:b896:b0:1bc:6072:6d6b with SMTP id o22-20020a17090ab89600b001bc60726d6bmr2448654pjr.210.1645507949230; Mon, 21 Feb 2022 21:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507949; cv=none; d=google.com; s=arc-20160816; b=St1UZBGug9mYz5L1PEqNLRX+CZ7+ApZRbHdoxzsxiY3KasVQFtRobb727fOgff1R9/ Go+Vtc292raFjUVDTVRD0kTwzNr2TtZbjzwKXhf8TRl5SJ0wow359TmR88V4zvfVuJct /H7X+DUVdwVFpHKNagBmOUQVF/J24jh/sE+rbtzqhisvbPnF7PFTBPZb74ozhGGhj1MH FABUoz46vZKdPsYb5+lQ9iqivKMop7DW8fQ6/NwFhIm+D9TcYUZ16DtuKE2rVAgWEwtH vrR84s6/m+HY1YVp9yZvpcVdXTk9G9+EwDaikfEwqooOoWujIlRxpeBTNaEwf7rI10Ql 46ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xFDb1GUFsG/iOQo6tsfrybhLst04OsiXCT+9GC3BjM0=; b=RmHjEZBLxNeKFwWNruFcQW89xAsaLL5S0pMddV3TtWj3EQQ7T2RiMlns1yKmT6ja3/ sSikdKJRQe2o8DXfvHx0Zk/2q5Y4CW0DkW15rzlegrLt1mpwO13W6BpLKi+LWqSyun47 aUvQ5xX/61NW1XNg58VogypCbnTQnnkCXtnuVn6P5l+M+9MZeFVunPuqz62zMCxVoo7l NIKAsJ7u8K4VtsBDIk8aaBe3gu5y+sIxkoQxQGLkZ8UP45yQDtj6DE4dEJafWOETx7Xb ydu77VNjZytZbvEx66T3jxVzAnYiEZBi56j6hjGMIj2hC9u+99kDNNmdbavnPZMheTfH c46g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oS3mCAcu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p8si12279347pfh.140.2022.02.21.21.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:32:29 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oS3mCAcu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 608B11160EA; Mon, 21 Feb 2022 21:00:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350898AbiBUJgP (ORCPT + 99 others); Mon, 21 Feb 2022 04:36:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348779AbiBUJ1d (ORCPT ); Mon, 21 Feb 2022 04:27:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70312636C; Mon, 21 Feb 2022 01:11:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05E5C60B1E; Mon, 21 Feb 2022 09:11:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D86C7C340E9; Mon, 21 Feb 2022 09:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434718; bh=fGDP0OZh7M9YwAIVBFrQdQ/1bd+Aa+ktRPvGVdtaMZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oS3mCAcuIWMYxzP5K0MTFCm9/8B3lfsO1Q+iRT9cMzZXXLZ9CyZg/IMKzOmoBY6J5 Aj0iBJRGxc57633Bb0UrsSWDB/NYS3gHJCePS9IXAE0PjTVJbatZlwTpoT11jVNdKe YhNA+RWc0MjC2mpDc5vJcFxN38GCxSAGyWQYXJPU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Radu Bulie , Ioana Ciornei , "David S. Miller" Subject: [PATCH 5.15 106/196] dpaa2-eth: Initialize mutex used in one step timestamping path Date: Mon, 21 Feb 2022 09:48:58 +0100 Message-Id: <20220221084934.480983015@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084930.872957717@linuxfoundation.org> References: <20220221084930.872957717@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org From: Radu Bulie commit 07dd44852be89386ab12210df90a2d78779f3bff upstream. 1588 Single Step Timestamping code path uses a mutex to enforce atomicity for two events: - update of ptp single step register - transmit ptp event packet Before this patch the mutex was not initialized. This caused unexpected crashes in the Tx function. Fixes: c55211892f463 ("dpaa2-eth: support PTP Sync packet one-step timestamping") Signed-off-by: Radu Bulie Reviewed-by: Ioana Ciornei Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4329,7 +4329,7 @@ static int dpaa2_eth_probe(struct fsl_mc } INIT_WORK(&priv->tx_onestep_tstamp, dpaa2_eth_tx_onestep_tstamp); - + mutex_init(&priv->onestep_tstamp_lock); skb_queue_head_init(&priv->tx_skbs); priv->rx_copybreak = DPAA2_ETH_DEFAULT_COPYBREAK;