From: Steven Rostedt <rostedt@goodmis.org>
To: Al Viro <viro@ZenIV.linux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] debugfs: Fix corrupted loop in debugfs_remove_recursive
Date: Tue, 10 Jun 2014 09:33:57 -0400 [thread overview]
Message-ID: <20140610093357.7ef3792b@gandalf.local.home> (raw)
In-Reply-To: <20140609140607.3e3aae39@gandalf.local.home>
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Mon, 9 Jun 2014 14:06:07 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> [ I'm currently running my tests on it now, and so far, after a few
> hours it has yet to blow up. I'll run it for 24 hours which it never
> succeeded in the past. ]
I ran with this patch on three boxes all night, one for 24 hours. No
problems. I stopped the tests, removed the patch, ran the test on the
same boxes and they all crashed within an hour.
This patch definitely fixes the bug.
The test I ran was:
while :; do
./ftrace-test-mkinstances || break
./ftrace-test-mkinstances-2 || break
done
Note, the tests expect debugfs to be mounted at /debug.
-- Steve
[-- Attachment #2: ftrace-test-mkinstances --]
[-- Type: application/octet-stream, Size: 1092 bytes --]
#!/bin/bash
if [ ! -d /debug/tracing/instances ]; then
echo "No instances directory"
exit 0
fi
cd /debug/tracing/instances
mkdir x
rmdir x
result=$?
if [ $result -ne 0 ]; then
echo "instance rmdir not supported, skipping this test"
exit 0
fi
instance_slam() {
while :; do
mkdir x
mkdir y
mkdir z
rmdir x
rmdir y
rmdir z
done 2>/dev/null
}
instance_slam &
x=`jobs -l`
p1=`echo $x | cut -d' ' -f2`
echo $p1
instance_slam &
x=`jobs -l | tail -1`
p2=`echo $x | cut -d' ' -f2`
echo $p2
instance_slam &
x=`jobs -l | tail -1`
p3=`echo $x | cut -d' ' -f2`
echo $p3
instance_slam &
x=`jobs -l | tail -1`
p4=`echo $x | cut -d' ' -f2`
echo $p4
instance_slam &
x=`jobs -l | tail -1`
p5=`echo $x | cut -d' ' -f2`
echo $p5
for i in `seq 10`; do
ls
sleep 1
done
kill -1 $p1
kill -1 $p2
kill -1 $p3
kill -1 $p4
kill -1 $p5
echo "Wait for processes to finish"
wait $p1 $p2 $p3 $p4 $p5
echo "all processes finished, wait for cleanup"
sleep 2
mkdir x y z
ls x y z
rmdir x y z
for d in x y z; do
if [ -d $d ]; then
echo $d still exists
exit -1
fi
done
echo SUCCESS
exit 0
[-- Attachment #3: ftrace-test-mkinstances-2 --]
[-- Type: application/octet-stream, Size: 767 bytes --]
#!/bin/bash
if [ ! -d /debug/tracing/instances ]; then
echo "No instances directory"
exit 0
fi
cd /debug/tracing/instances
instance_slam() {
while :; do
mkdir foo &> /dev/null
rmdir foo &> /dev/null
done
}
instance_read() {
while :; do
cat foo/trace &> /dev/null
done
}
instance_set() {
while :; do
echo 1 > foo/events/sched/sched_switch
done 2> /dev/null
}
instance_slam &
x=`jobs -l`
p1=`echo $x | cut -d' ' -f2`
echo $p1
instance_set &
x=`jobs -l | tail -1`
p2=`echo $x | cut -d' ' -f2`
echo $p2
sleep 10
kill -1 $p1
kill -1 $p2
echo "Wait for processes to finish"
wait $p1 $p2
echo "all processes finished, wait for cleanup"
sleep 2
mkdir foo
ls foo
rmdir foo
if [ -d foo ]; then
echo foo still exists
exit -1
fi
echo SUCCESS
exit 0
next prev parent reply other threads:[~2014-06-10 13:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 18:06 [RFC][PATCH] debugfs: Fix corrupted loop in debugfs_remove_recursive Steven Rostedt
2014-06-10 13:33 ` Steven Rostedt [this message]
2014-06-10 20:23 ` Greg Kroah-Hartman
2014-06-10 20:22 ` Steven Rostedt
2014-06-10 20:33 ` Greg Kroah-Hartman
2014-06-30 15:53 ` Steven Rostedt
2014-06-30 16:26 ` Greg Kroah-Hartman
2014-06-12 10:43 ` Al Viro
2014-06-12 16:08 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140610093357.7ef3792b@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).