From: Andrew Morton <akpm@digeo.com>
To: Olaf Dietsche <olaf.dietsche#list.linux-kernel@t-online.de>
Cc: Ben Clifford <benc@hawaga.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.46: access permission filesystem
Date: Sun, 10 Nov 2002 18:27:31 -0800 [thread overview]
Message-ID: <3DCF1593.CB9C7AA4@digeo.com> (raw)
In-Reply-To: 87k7jkg969.fsf@goat.bogus.local
Olaf Dietsche wrote:
>
> Ben Clifford <benc@hawaga.org.uk> writes:
>
> > I still get those stack traces, though...
>
> I retested with CONFIG_PREEMPT=y and now I get those stack traces,
> too. So, it seems my code is not preempt safe.
>
It's not that your code is unsafe with preemption. It's just that
CONFIG_PREEMPT=y turns on the debugging infrastructure which allows
us to detect things like calling kmalloc(GFP_KERNEL) inside spinlock.
+static int accessfs_node_init(struct accessfs_direntry *parent, struct accessfs_entry *de, const char *name, size_t len, struct access_attr *attr, mode_t mode
+{
+ static unsigned long ino = 1;
+ de->name = kmalloc(len + 1, GFP_KERNEL);
+ ...
+
+static int accessfs_mknod(struct accessfs_direntry *dir, const char *name, struct access_attr *attr)
+{
+ ...
+ spin_lock(&accessfs_lock);
+ accessfs_node_init(dir, pe, name, strlen(name), attr, S_IFREG | attr->mo
next prev parent reply other threads:[~2002-11-11 2:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 15:51 [PATCH] 2.5.46: access permission filesystem Olaf Dietsche
2002-11-10 1:33 ` Ben Clifford
2002-11-10 15:56 ` Olaf Dietsche
2002-11-11 0:11 ` Ben Clifford
2002-11-11 1:57 ` Olaf Dietsche
2002-11-11 2:27 ` Andrew Morton [this message]
2002-11-11 17:45 ` programming for preemption (was: [PATCH] 2.5.46: access permission filesystem) Olaf Dietsche
2002-11-11 18:17 ` programming for preemption (was: [PATCH] 2.5.46: accesspermission filesystem) Andrew Morton
2002-11-11 23:19 ` Olaf Dietsche
2002-11-11 18:23 ` programming for preemption (was: [PATCH] 2.5.46: access permission filesystem) Roland Dreier
2002-11-11 23:58 ` Zwane Mwaikambo
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=3DCF1593.CB9C7AA4@digeo.com \
--to=akpm@digeo.com \
--cc=benc@hawaga.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf.dietsche#list.linux-kernel@t-online.de \
/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