Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4407888pxb; Mon, 21 Feb 2022 20:36:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxFQbJkEDjA7RqkXEjJmPiVrjJEXDps0FQ7UD4dd2cDRRb3eFoR2KQeG33qmhU0zzRo2XV X-Received: by 2002:a17:902:ec88:b0:14f:d5fb:7a8c with SMTP id x8-20020a170902ec8800b0014fd5fb7a8cmr3298866plg.5.1645504578860; Mon, 21 Feb 2022 20:36:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645504578; cv=none; d=google.com; s=arc-20160816; b=JpQvAFTTXRNJLe5XU6LK5NVcs39CD9MiuQUzEOLoWg8btosRCr1jUsqoC91spaQJNm 4S1VuHKEhbh9wr+SmCHIO2WU3CepzbkNCJvPFJc+09EdA1D2LTIUFd5DCdltAs+dV7cG X6WMtNzaI6hYCmuQeyCL2LRakV2qmlX03y+kLdgywW21jCsFODNzY3r0G2DMat6hVylj usqCrl7K2lvytLNoLBRhavkdv1OuwiBoJ3QzcZQMfNJ8IEnCC2DIHnoaa5MPEns0+Xw5 av0cjazDMeLyh62o+C5g4P4sBrGXyZ6ubBEGh6DO7pt2iKFC/oLIULz4eq7mzjDEcr+P PdRw== 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=P/WqLu++B5Po5AZmqxkZLOA/NiZw0CrFg8A0ZlAHrUM=; b=RgdbHr6Jqw2FCvvOR9Rw1AYeWQ42BEAmeqp81jYVeCsJLIoZ2mcAZaWrqrFjjz+48U +fkkX+wNzE6/iNoF5SUEgTphRFsWGCIsmFh8rmbMkDdzlJBZMh5O1GQsasgDTRsNpCpR LtXDSCyLA7bWCElQdBxGjYGX5OZLC2qrIDmcAxbFzMgWC4qrI/FyDh1zFgz26GqRQ5n8 7pLozYjSY98HDXOuozSaN3moMTeOjUwXLeCw/8pQBfIjMK8rJRb8pl5tzuvHTxlQ6nBb co14B3eRI5Lsy69s6Lxha0Zkgevgvfj6Xd6zbjBKgbceDnhMqWJ9epjwIaznf+mqStAP XhSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uxve6kuU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h34si4021279pgl.622.2022.02.21.20.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:36:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uxve6kuU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 6980B86E32; Mon, 21 Feb 2022 20:24:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351640AbiBUJz3 (ORCPT + 99 others); Mon, 21 Feb 2022 04:55:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353171AbiBUJsO (ORCPT ); Mon, 21 Feb 2022 04:48:14 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AC2F245B7; Mon, 21 Feb 2022 01:22:23 -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 sin.source.kernel.org (Postfix) with ESMTPS id 03371CE0E99; Mon, 21 Feb 2022 09:22:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9366C340E9; Mon, 21 Feb 2022 09:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435340; bh=fwaNIrTegvr6pWGxol4RaH+MTh18LMtcHdg5nvjy+vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uxve6kuUirtBcdr1qrTmFV29wf5+45rZprSpdfKMYLcatxKPrbwxcacFGkiGUeDu4 MhU6G0i0OTmuCCc/SUXvMsRDchWbJxhnY0Zi3VFks0idSackiVqCRy96vnxaTXRzwz ASbyd3UcLUxQgYC2vzi6K1xvU6lFxdkLnOH4fJF8= 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.16 129/227] dpaa2-eth: Initialize mutex used in one step timestamping path Date: Mon, 21 Feb 2022 09:49:08 +0100 Message-Id: <20220221084939.140029131@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@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 @@ -4338,7 +4338,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;