Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1926193pxb; Fri, 29 Jan 2021 08:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJylSDRnL14rJqj1qdL9bEWiqY2VUccDdCoo9vjmPXLnN3YZ3tlqkOygX1Liv6jQaDuoBunY X-Received: by 2002:a17:906:7e0f:: with SMTP id e15mr5392150ejr.150.1611938034431; Fri, 29 Jan 2021 08:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611938034; cv=none; d=google.com; s=arc-20160816; b=FUf+OZjjQxvzmrAi3QjSRGhIwmu5KRGNqBqjOaiWxbUW11QNca1U7EAQau1FswiUnk q0mFzRkz8jnefmBTULVluvbMtMEgnywHoCiZS9Nd5ZHoxLnLJxaAqSl7e+QYIid+dfVM ytSVqFe8hZpm3F5+YTO0Zc9UR3J7sPctMQU7xaZjBtgXolBnKUSnHnJXir0MQGuD9xL7 i+wy+U3EE5oyIkcq04NpnQ4TtVLtkWUXFQjeCs/YjnKpgh/73KFOd39SkloOmIZRa8L6 oZ8csrSr6SvIYjyoQaIvbjRV1RqdXd+0XHEHtKPQqZg6c/wiJaefCQyrLds7cwUJLKSA Ok+Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=673kdG5cStF47COwBizGARTJmEo0fGgjARVwrzuy47U=; b=xjFb0bu/EQLUABQL5yz+mpRNFR6I5Qy++WJ92SmChmuFQE6yJV5PK/SRQLnBfMXi7x VLoP2nzcK5JDacjP9JgILzOFvgaWQVdd6pscCqurkyHmQd9GNLYvA8FuZu2bsuK2XNP2 iTDKWwMcNsY0IZc1nIEiDkYrpLvYmzRJdFaXMHsd8zhbYo53IvVmpEuDyG0zn5cwdPDN xFTjLlkozFjgUN/GCAv67IO90cTATHM5Njik1jiEoPj9MyW/QXlWiJqj1KrKcxzOK8ks hR2H6bZX0izqT/GobTw5M8700PiXaZEQrgYA8J47bmUHN+XuwN021lnptuQdrUSqpEPI rGow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si5108768ejb.250.2021.01.29.08.33.29; Fri, 29 Jan 2021 08:33:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbhA2Q3s (ORCPT + 99 others); Fri, 29 Jan 2021 11:29:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:54944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbhA2Q3d (ORCPT ); Fri, 29 Jan 2021 11:29:33 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 918DD64DFD; Fri, 29 Jan 2021 16:28:51 +0000 (UTC) Date: Fri, 29 Jan 2021 11:28:49 -0500 From: Steven Rostedt To: "Naveen N. Rao" Cc: Wang ShaoBo , cj.chengjian@huawei.com, huawei.libin@huawei.com, xiexiuqi@huawei.com, naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, linux-kernel@vger.kernel.org, ananth@linux.ibm.com Subject: Re: [PATCH v2] kretprobe: avoid re-registration of the same kretprobe earlier Message-ID: <20210129112849.29b0ecab@gandalf.local.home> In-Reply-To: <20210129095347.GD117@DESKTOP-TDPLP67.localdomain> References: <20210128124427.2031088-1-bobo.shaobowang@huawei.com> <20210129095347.GD117@DESKTOP-TDPLP67.localdomain> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jan 2021 15:23:47 +0530 "Naveen N. Rao" wrote: > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index f7fb5d135930fa..63a36f33565354 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -1530,6 +1530,7 @@ static inline int check_kprobe_rereg(struct kprobe *p) > ret = -EINVAL; > mutex_unlock(&kprobe_mutex); > > + WARN_ON(ret); > return ret; > } Please use WARN_ON_ONCE(ret); Thanks, -- Steve