From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756531AbdEMTcK (ORCPT ); Sat, 13 May 2017 15:32:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41188 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755847AbdEMTcJ (ORCPT ); Sat, 13 May 2017 15:32:09 -0400 From: "Naveen N. Rao" To: Steven Rostedt , Shuah Khan Cc: Michael Ellerman , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 0/4] ftrace: Fix a few issues Date: Sun, 14 May 2017 01:01:00 +0530 X-Mailer: git-send-email 2.12.2 X-TM-AS-MML: disable x-cbid: 17051319-0008-0000-0000-0000012C299B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17051319-0009-0000-0000-0000095ACAA0 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-13_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705130340 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes a kernel oops when an ftrace instance is deleted while there are still active event triggers. Patch 2 provides details on how to reproduce as well as the kernel oops message. This issue was reported by Michael Ellerman as a crash seen when trying to run the ftrace test suite. In looking into it, I noticed that the issue actually showed up due to a few bashisms in the ftrace tests when run on Ubuntu. Those bashisms meant that the ftrace instance was being deleted without removing the event triggers. Patch 3 includes a fix for the bashisms. Patch 4 adds a test case to explicitly catch this issue going forward. - Naveen Naveen N. Rao (4): ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() ftrace/instances: Clear function triggers when removing instances selftests/ftrace: Fix bashisms selftests/ftrace: Add test to remove instance with active event triggers kernel/trace/ftrace.c | 12 ++++++++++-- kernel/trace/trace.c | 1 + kernel/trace/trace.h | 1 + tools/testing/selftests/ftrace/ftracetest | 2 +- .../selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 2 +- tools/testing/selftests/ftrace/test.d/functions | 4 ++-- .../selftests/ftrace/test.d/instances/instance-event.tc | 8 ++++++-- 7 files changed, 22 insertions(+), 8 deletions(-) -- 2.12.2