Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp365531lqi; Wed, 6 Mar 2024 22:12:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+720s6nMewTN5FlbvZoM+emoV2pAVsBa2hNpgpXft6l1xl8xVpZSuiWMk/6T/i38lWhmWdIojcww/xKNMUlke5HYdh2FLjQEqnxYT8w== X-Google-Smtp-Source: AGHT+IF6xWvWycDC9uu8tt/vZDA32QFz2DOQ+g7OwXvQ/42V/D1rGkTj3GYVY6dRK4aX75cF7gpI X-Received: by 2002:a05:620a:1648:b0:788:220d:4b86 with SMTP id c8-20020a05620a164800b00788220d4b86mr7621192qko.45.1709791957822; Wed, 06 Mar 2024 22:12:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709791957; cv=pass; d=google.com; s=arc-20160816; b=bXubSDvM6MevmQUIpMa7g1cJ8By4JSB5mTZyjlzYG0pPUtCwpGaQ1goYk8HIG45s6d TWRPRVxBr3nIQ+M0KzUka22RVk+hbC/9zFk9mamJGuA/ctIuf0l+EqrxBcPM+MtCUlZu Z+Y64Ogmrn8K4KeYyhHHMhkMjtWlbVZNj76HW7q/4Q/hyBeU59mEl2+ufNePUO1GWhHR 9sskliYX2VyyTihYIkWxj1/hCDsG+4gIP1ZN2wJUZHZoSBmGnn9ruvaLKSs5Lb1pNf9e 5wLMlXl2aZM9VioOTIzQEombLSg9dKLye3NBCYh+Hd6JPj31iY44BsogIxlyOFUyzRDb uRag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=p4Y+dvcNFxHEW88GAjN4mCBlL8PLHNVfvK8NIA4VGmk=; fh=tN7ek42/86meYrwtZ/8WcysY7hDLDzsyns0+p5YTTZo=; b=teDDSfeMi0J4fspWGHwwQoV5XAyXvJLesmqa4xTxrBCixV3IAgDisbCDG3LRjvBgqA nSGUaHfa35VYdcKkTm6xBjdyyfZr1cOtoccIwVnh12lR3HYe+j8591VDpra4ZKH64vUn pyVE4JX7d7Kd2XEEn1/DPvflWAn8dx3dBge636K2tWL41sqkTKT9491nX+RZhxoti+PW jwV8lE5ZB/rzALz+j8w6BzAyaN92XF9veobqJSv31HXnQpyzTxM1FawZOs6JnOwFukCB YXFQfrFot7QQFCb+BsN3f7r3a2JQKM/VTIbkDGGnXSIbefZDx9H9PXjOxA6jOU13Iu0Z EHPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-94998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w24-20020ae9e518000000b00788451a9130si1125840qkf.160.2024.03.06.22.12.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 22:12:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-94998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 497881C22577 for ; Thu, 7 Mar 2024 06:12:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E6C81BF50; Thu, 7 Mar 2024 06:12:26 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 199D61B962; Thu, 7 Mar 2024 06:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709791945; cv=none; b=YCmWIFbN2u7Icluh+dMa5s8mR+mt6hKZZ5AmvxFqZaOKMT3s02aHj3mESPTeR0dRNU5sW77BPfMhQIlND2TzIm9NeW626zHOYNh4Mha+HfC7MXTqy0boh8b8rQ6ZSRbqmMNvxFKty/5lRzHe5yFEMavp/g86DsnhxSZrz9CxF2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709791945; c=relaxed/simple; bh=DRo6eJeGQJ00JVz4D2h95vwOL6LeG1q9aZotWKYLrUw=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KzyR7Ob+/bp21/ZvlUhf3BhtvWM+gCZxwV8abStD59KM+2+GWv2Wu2ITzCK6AJyUmkkfuqZ/oXtpOImAuHV9uvLoe/CBYRWjIjLxbVSWpuinm5mIJxfXflEuucxezqY9aaYMwx3Intkr0qRUveOW6b8m0kIR/UPHBfUNUrvGJ88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TqzSK3P1hzNlwD; Thu, 7 Mar 2024 14:10:41 +0800 (CST) Received: from dggpemd500003.china.huawei.com (unknown [7.185.36.29]) by mail.maildlp.com (Postfix) with ESMTPS id 7FCD51404F3; Thu, 7 Mar 2024 14:12:20 +0800 (CST) Received: from localhost.localdomain (10.175.101.6) by dggpemd500003.china.huawei.com (7.185.36.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 7 Mar 2024 14:12:19 +0800 From: gaoxingwang To: , , , , CC: , Subject: [PATCH] net: fix print in skb_panic() Date: Thu, 7 Mar 2024 14:11:43 +0800 Message-ID: <20240307061143.989505-1-gaoxingwang1@huawei.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemd500003.china.huawei.com (7.185.36.29) skb->len and sz are printed as negative numbers during the panic: skbuff: skb_under_panic: text:ffffffff8e2d3eac len:-1961180312 put:-1961180408 head:ffff88800b6ac000 data:ffff887f804ffe78 tail:0x1e0 end:0xec0 dev:team0 Use %u to print skb->len and sz,because they are defined as unsigned int. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: gaoxingwang --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 83af8aaeb893..55173b4b3ec7 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -186,7 +186,7 @@ EXPORT_SYMBOL_GPL(drop_reasons_unregister_subsys); static void skb_panic(struct sk_buff *skb, unsigned int sz, void *addr, const char msg[]) { - pr_emerg("%s: text:%px len:%d put:%d head:%px data:%px tail:%#lx end:%#lx dev:%s\n", + pr_emerg("%s: text:%px len:%u put:%u head:%px data:%px tail:%#lx end:%#lx dev:%s\n", msg, addr, skb->len, sz, skb->head, skb->data, (unsigned long)skb->tail, (unsigned long)skb->end, skb->dev ? skb->dev->name : ""); -- 2.27.0