Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25559802rwd; Sun, 2 Jul 2023 20:22:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cxL88gz7pS3lj7PSHE0MKPsecp5Y1k55cbtbYbJBUgb25y9GwUNp2UODrcBQPzZxYQ693 X-Received: by 2002:a05:622a:1047:b0:3fd:eca6:8ae3 with SMTP id f7-20020a05622a104700b003fdeca68ae3mr11897922qte.64.1688354528135; Sun, 02 Jul 2023 20:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688354528; cv=none; d=google.com; s=arc-20160816; b=c4WDBWniV7k6jnU+nCX+hsZkBGhMrDMj1IBg0KUfGvmAtCORCiR93iY7Bo9dOGCrMh iD2e8VErfTGiumezHNv5aH0w33yv5+pMEmu+PIuxevCgXFPxkZph8+f47VcP/rZ9/fO4 xBxN650u78rhctfN0p50WNDjwFjbFjhlDFQ2eGszBOFawH8rCWJzSr4VvPxsCpLfenoQ tOHYffUuCmkgeHjMmMf2F7n4vc3rIXHjZVDjrRqOzU4zQ2vLPBLBaSH7Fi5pHon9W9gf afRl6PQV/PBy3IGDW03KOL2getYfIIoX11+TSFUQJw+WPr6SO7EOdJY0YY/MLNH7vO0N kWdg== 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 :message-id:date:subject:cc:to:from; bh=Kw3nDq6mFbf/OWB//GugbSqRVJvFUW+LM8bmSRp+xVQ=; fh=MDcLyW7gnQ7zhVrwu4ydSY34K8iXsxgpLnkzEl2cuwA=; b=v3sweAQNsTfQ1ZAo8KPuMbRZZrGzkjsKR47esG7aB5HBi7nWWSsvB5EFppvaKKlMn3 HqOr9BrHP422Fa1Gv56EcHbW0u8DFqg79hZvrh1ADpK3LJe8RvERxkD9gbAqnlYRmt8y V2EOvixK8QrOPnA7vSzuzSJuD3Whya8JCSu/TPcN/mioVjUtle889zysnp0w+MeOb+ME C0VeUojdr2mEriYDeKaA8RZdHuKkJ71uyrddZzje4hmkAXvcOpVMuHWl6XRqmyPnM90i 9XBWVg5zdfCDu6XJ2/Rvg0kXm46D77QRcS5EYByjbB+GMdHDS82dMJG1P/8MbG7wXFeC tjHQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d30-20020a631d5e000000b005573740ea33si17456973pgm.534.2023.07.02.20.21.55; Sun, 02 Jul 2023 20:22:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjGCDMo (ORCPT + 99 others); Sun, 2 Jul 2023 23:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjGCDMn (ORCPT ); Sun, 2 Jul 2023 23:12:43 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0CFBA1BE; Sun, 2 Jul 2023 20:12:40 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id A79E76096E8F9; Mon, 3 Jul 2023 11:12:39 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, mhiramat@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kprobes:=20Remove=20unnecessary=20=E2=80=98NULL?= =?UTF-8?q?=E2=80=99=20values=20from=20correct=5Fret=5Faddr?= Date: Wed, 5 Jul 2023 03:43:59 +0800 Message-Id: <20230704194359.3124-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,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 The 'correct_ret_addr' pointer is always set in the later code, no need to initialize it at definition time. Signed-off-by: Li zeming --- kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index db8a3aa53cf6..ec50f9f380c1 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2007,9 +2007,9 @@ void __weak arch_kretprobe_fixup_return(struct pt_regs *regs, unsigned long __kretprobe_trampoline_handler(struct pt_regs *regs, void *frame_pointer) { - kprobe_opcode_t *correct_ret_addr = NULL; struct kretprobe_instance *ri = NULL; struct llist_node *first, *node = NULL; + kprobe_opcode_t *correct_ret_addr; struct kretprobe *rp; /* Find correct address and all nodes for this frame. */ -- 2.18.2