Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2475805pxj; Mon, 10 May 2021 04:02:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxcm0XmVD+IQ81M4RN5YXm0Xty70uXDUwX30rwEwzguckB3uEvbWbJ+QvmWS+ligqRzzKm X-Received: by 2002:a92:d409:: with SMTP id q9mr21383699ilm.276.1620644535633; Mon, 10 May 2021 04:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644535; cv=none; d=google.com; s=arc-20160816; b=O6+9NOsuNvksXywEMjYzAcEi8tick9Mla9qnesvqGOlFWYm6Sq/DVnnhr/VXy0Q5CJ IX6oN+uHR8LP3wDjrZ59UQS6v/XyTyb5VAOrGejSq+78pcgMMtEoEk7D4diuQMPbw7sE 5Owh6RI7tXuykVrXGJ0XaauFrDqhfXBp4nOoveL6ofUPWD16KR1DlODCP305oyl7YiRC XFyziG7j4RLDfF6gRNoVASO4cN3Xb24zY3dxmNCPjpESK2c4mgIVwC8aplp0l8SBp33c 47HiD10IbRVnYSApqBW+ls5h57Lvxkp3gv+BA5E6SKJXIX4ntMZVObjr6al3AgGju5Q4 YYXQ== 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=iknnUGOi1vxo5iFOclcXSSkJgxXhoeuxECMs8CUlvhk=; b=lIKmjv9UW5W89xo4lk1XALTLmwOFxVHXCCg7+ZKV57wWmqFqU7c/Su7tHbsy04ttZq vGeSMZRFC6q0BfVs6o1l9vGu3l72AMGXXeNsqjz0AoLi3aWUPrtjqDMytFNcQHjCcUI+ fsuhFbk0+W/Vu7N6pAr2m35qegajRB7fnNUf/8dcCWJkSTFfwDz9hlZhDx2rzdOGJ2hD Cy2wJvwlXxhbJOyaF6OJNN/5EPWMKVcFAqqyFOODLav/aBoVQHcdPCAGgiHV4MhWcfF8 hAwCHDT7tm1jggF7wsm6gPDGyvg5N3OylI+6qqiNfYTt81hUMvaGgGr7ubwIxR4TuF+U f/Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=caQvE+15; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si10334249ilq.147.2021.05.10.04.02.02; Mon, 10 May 2021 04:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=caQvE+15; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233494AbhEJK7P (ORCPT + 99 others); Mon, 10 May 2021 06:59:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:58338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231951AbhEJKnr (ORCPT ); Mon, 10 May 2021 06:43:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0A66561985; Mon, 10 May 2021 10:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642785; bh=Zrn6PZ/vD053kAqHNW7k7BCKX5TpMdTryt4Px1tVa7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=caQvE+15NjmW4w8L3AiK/fL5XJB9r8w4BF2dQteUhsuXCdvDLxiuc3BcnBvvP76cf YonWqcSkdCdABreL1nOIHj0CauGxZ86bdeBqh4OisXcSsuJuvb0QKpusBEzvmMTHjh KYXqOLyiNBDAqmBypgR+l8MoTn4KQIi20jO1CUno= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Shuo Chen , Jason Baron Subject: [PATCH 5.10 005/299] dyndbg: fix parsing file query without a line-range suffix Date: Mon, 10 May 2021 12:16:42 +0200 Message-Id: <20210510102005.004525410@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuo Chen commit 7b1ae248279bea33af9e797a93c35f49601cb8a0 upstream. Query like 'file tcp_input.c line 1234 +p' was broken by commit aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'") because a file name without a ':' now makes the loop in ddebug_parse_query() exits early before parsing the 'line 1234' part. As a result, all pr_debug() in tcp_input.c will be enabled, instead of only the one on line 1234. Changing 'break' to 'continue' fixes this. Fixes: aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'") Cc: stable Reviewed-by: Eric Dumazet Signed-off-by: Shuo Chen Acked-by: Jason Baron Link: https://lore.kernel.org/r/20210414212400.2927281-1-giantchen@gmail.com Signed-off-by: Greg Kroah-Hartman --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -396,7 +396,7 @@ static int ddebug_parse_query(char *word /* tail :$info is function or line-range */ fline = strchr(query->filename, ':'); if (!fline) - break; + continue; *fline++ = '\0'; if (isalpha(*fline) || *fline == '*' || *fline == '?') { /* take as function name */