Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2760447rwe; Sun, 16 Apr 2023 05:03:02 -0700 (PDT) X-Google-Smtp-Source: AKy350b3B7yog6u7tPqnDOzUZFvBCrhlyM3dU8lW/vBvstIxes16DisJO1CkASmuIQ/7GuwkRLZT X-Received: by 2002:a17:902:c947:b0:1a6:7ea8:9f47 with SMTP id i7-20020a170902c94700b001a67ea89f47mr10755679pla.66.1681646582217; Sun, 16 Apr 2023 05:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681646582; cv=none; d=google.com; s=arc-20160816; b=Ipw7k4XCSwm+sk06ZFBVPLapuXw63g+5UAoJW7ts6Ju9J3coF+EiFkzO0EDSnl/JNu R0jLiH1q0BxS7PrOGnJQUEJuQMSMFZOcEOKepvvD2Ixo6gYalpz3HiFK6xvRo5wnR3gB NxSmERBUtwLLWCY0xYZoV2Vw9Qq/At0B6UKlRxIEX5sUpRCQ/sVODqzggx2QOiv6BI64 y/svpm782hRVxKU7rOctlYru8ht00cEVh8sXEA9VGm7sHav2O03wGijPv0myivPT1shq Nx5eGjKFKhZdwABnu1IcEMpoJwoodeNIBV4Ljs60WS/WaMC9bGJjLAAo8kUForlUDgCu ZXCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:to:subject:message-id :date:from:in-reply-to:references:mime-version:dkim-signature; bh=rHFyNrT1VfxBGxS1NMERI8Qt8lLflFfoWypKZafbriw=; b=Cq2Yatn0+ho5e6KsoWZcq8r15Yio5Zcrr21oLzXlTePKxHGDcciedxTN90cOANOIQ4 JpxXx5AEDPnZRIaFS58ID+BDPyq0FUSEaekt9+qfm3u8dY38lGYdLSmvp5rYFkmKoEOt T0HpFPlgfnLKxYejYDATxNzPmqd2zBCKLbKJBAYDCHkHav4biWcgQVAq/lRffSvMUAtA TYMo4Ehb8p0eASN5G7pMbXGG6aN2x1ndXABjr36gGR3wvCyXE1/iPZp/gZ5T7Jdi6aNu 3FB7l7jaIVZsKv5mphywebjCmLKR8t3agJbLQmF6e9XVb8woilVYk3vGRHc43UZdPTh2 I4LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Gr2Cwbik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a170902e89000b001a51bb4ad79si10354185plg.42.2023.04.16.05.02.27; Sun, 16 Apr 2023 05:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Gr2Cwbik; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbjDPMCX (ORCPT + 99 others); Sun, 16 Apr 2023 08:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjDPMCW (ORCPT ); Sun, 16 Apr 2023 08:02:22 -0400 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6E572691; Sun, 16 Apr 2023 05:02:21 -0700 (PDT) Received: by mail-vs1-xe2b.google.com with SMTP id l16so739981vst.2; Sun, 16 Apr 2023 05:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681646541; x=1684238541; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rHFyNrT1VfxBGxS1NMERI8Qt8lLflFfoWypKZafbriw=; b=Gr2CwbikwHB7A59r50sarUS2CH/dcuZbg4pEeTnK59LgL4W7cobcQfIca5jvAormlP h6gTpxoetqb3fawVvKobCLEzru3gi5FuEkzkSC9uVFdrsUOk5QAkYltNOkyvqpEt1ke+ uGpUhG3L8gWRiUUZUR6ooDa0dr8FsdXvHxUVH+zUBY4/tp0NDNW4dxxgvuVmkPi6MOjZ tqrqlMKQVzErFtbzkNwmjKPRnlLDmrqfK/H9qjDVk1ZUjHDvM4WMoKQjPNL0ummH2raU vE7Osg1VB8voInyqCVHKG74Ih+C4eSAeVCXPdM42sMLQudrqo9yCJdiGq40ArW1TCGdm eGkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681646541; x=1684238541; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rHFyNrT1VfxBGxS1NMERI8Qt8lLflFfoWypKZafbriw=; b=O5VJQsRdGYBVOTKUgJIx6txaRo8MfnnKcDBQJ2cJblJyCBYs1YUBIVQYmngPHu4LpX pwR/fXujSW5G3GS87i92zwzluO9+vu8ImDMmGE2dCSCO/uNNzfTrBMt/TB74zQtF2OZN Y8Pmx0NkB+bx82eIWL32MVZl0efecuZnIFQQR2BKpjFNzWRjdnpNNvZWxTl2lttC1oQ7 93VNN+vvgWMn/on7YTX+1SDLGONWqObM40lEUFH7shDXeGaBn/BXZdw/FwqcEDPNQQzh THdf0p35Et2m8KCzEtQsSwWjdzP/Elup7gQYHS87zZwlwlZ558CNkrgZfcstBSSLll/v c5iQ== X-Gm-Message-State: AAQBX9ePOBp4XqAVIlhbzRbk8s3Uhzv+eBW86jSXYq25X45lcjC7pPCt dG9kz+N9Ygodbkd1VRZB3aCAoqu7LtjUCMwcgyk= X-Received: by 2002:a67:d715:0:b0:42c:3bcf:f927 with SMTP id p21-20020a67d715000000b0042c3bcff927mr6800346vsj.4.1681646540836; Sun, 16 Apr 2023 05:02:20 -0700 (PDT) MIME-Version: 1.0 References: <20230305212519.499-1-yongsuyoo0215@gmail.com> In-Reply-To: <20230305212519.499-1-yongsuyoo0215@gmail.com> From: YongSu Yoo Date: Sun, 16 Apr 2023 21:02:09 +0900 Message-ID: Subject: Re: [PATCH] media: dvb_demux: Fix a bug for the continuity counter To: 0215yys@hanmail.net, yongsu.yoo@lge.com, mchehab@kernel.org, tommaso.merciai@amarulasolutions.com, yongsuyoo0215@gmail.com, hverkuil-cisco@xs4all.nl, colin.i.king@gmail.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi ~ Everyone Can you share how this patch is going ? 2023=EB=85=84 3=EC=9B=94 6=EC=9D=BC (=EC=9B=94) =EC=98=A4=EC=A0=84 6:25, =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > From: YongSu Yoo > > Signed-off-by: Yongsu Yoo > > In dvb_demux.c, some logics exist which compare the expected > continuity counter and the real continuity counter. If they > are not matched each other, both of the expected continuity > counter and the real continuity counter should be printed. > But there exists a bug that the expected continuity counter > is not correctly printed. The expected continuity counter is > replaced with the real countinuity counter + 1 so that > the epected continuity counter is not correclty printed. > This is wrong. This bug is fixed. > --- > drivers/media/dvb-core/dvb_demux.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/= dvb_demux.c > index 398c86279b5b..7c4d86bfdd6c 100644 > --- a/drivers/media/dvb-core/dvb_demux.c > +++ b/drivers/media/dvb-core/dvb_demux.c > @@ -115,12 +115,12 @@ static inline int dvb_dmx_swfilter_payload(struct d= vb_demux_feed *feed, > > cc =3D buf[3] & 0x0f; > ccok =3D ((feed->cc + 1) & 0x0f) =3D=3D cc; > - feed->cc =3D cc; > if (!ccok) { > set_buf_flags(feed, DMX_BUFFER_FLAG_DISCONTINUITY_DETECTE= D); > dprintk_sect_loss("missed packet: %d instead of %d!\n", > cc, (feed->cc + 1) & 0x0f); > } > + feed->cc =3D cc; > > if (buf[1] & 0x40) // PUSI ? > feed->peslen =3D 0xfffa; > @@ -300,7 +300,6 @@ static int dvb_dmx_swfilter_section_packet(struct dvb= _demux_feed *feed, > > cc =3D buf[3] & 0x0f; > ccok =3D ((feed->cc + 1) & 0x0f) =3D=3D cc; > - feed->cc =3D cc; > > if (buf[3] & 0x20) { > /* adaption field present, check for discontinuity_indica= tor */ > @@ -336,6 +335,7 @@ static int dvb_dmx_swfilter_section_packet(struct dvb= _demux_feed *feed, > feed->pusi_seen =3D false; > dvb_dmx_swfilter_section_new(feed); > } > + feed->cc =3D cc; > > if (buf[1] & 0x40) { > /* PUSI=3D1 (is set), section boundary is here */ > -- > 2.17.1 >