From patchwork Mon Aug 24 08:29:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264954 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14C34C433DF for ; Mon, 24 Aug 2020 09:56:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E936122B4B for ; Mon, 24 Aug 2020 09:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598262980; bh=NSM0kikoMYd4CitRmeGSudrfPq2pKTmsMTIAOfWWzhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=E5tge62VhZY4av8r9Ag89ogY5UIXd/y+3CCch7lJU4fMGFFLpQHbQNgk55kXQiOn4 Tqg+XC9vQeSfDCKauoacBhI7XXWHLtLDpOEJArxDKDQSTeDkUe7dhqzxeBqnEaEGZi zJV3JlRA5GV8t8v4sjY6tBrPY3avevAVbCY9CULM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728174AbgHXIfu (ORCPT ); Mon, 24 Aug 2020 04:35:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:47222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728169AbgHXIfs (ORCPT ); Mon, 24 Aug 2020 04:35:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DBF14207D3; Mon, 24 Aug 2020 08:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598258148; bh=NSM0kikoMYd4CitRmeGSudrfPq2pKTmsMTIAOfWWzhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sr19kNxjKpwRJ/oBMS3QkJqd0B/62vhukwOLvRlmEmI7QOPsN5KJy73G5XPpIHKAr oJcY8UwdUqDSSfk2edIO93+z+J3KGlF6g5RKg8uC9cKfI2gX0mg55IneMLNrf3x/Rs lVsVE/YrX0Qdjp9TRn3WQ/WZB1ChztLxT3K3AJLk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Changzhong , Oleksij Rempel , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.8 093/148] can: j1939: cancel rxtimer on multipacket broadcast session complete Date: Mon, 24 Aug 2020 10:29:51 +0200 Message-Id: <20200824082418.501852220@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824082413.900489417@linuxfoundation.org> References: <20200824082413.900489417@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhang Changzhong [ Upstream commit e8b17653088f28a87c81845fa41a2d295a3b458c ] If j1939_xtp_rx_dat_one() receive last frame of multipacket broadcast message, j1939_session_timers_cancel() should be called to cancel rxtimer. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1596599425-5534-3-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- net/can/j1939/transport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 67189b4c482c5..d1a9adde677b0 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -1811,6 +1811,7 @@ static void j1939_xtp_rx_dat_one(struct j1939_session *session, } if (final) { + j1939_session_timers_cancel(session); j1939_session_completed(session); } else if (do_cts_eoma) { j1939_tp_set_rxtimeout(session, 1250);