From: Nuno Monteiro <nuno@itsari.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Mikael Pettersson <mikpe@csd.uu.se>,
David Howells <dhowells@redhat.com>,
linux-kernel@vger.kernel.org, marcelo.tosatti@cyclades.com
Subject: Re: [2.4] build error with latest BK [fixed patch]
Date: Wed, 16 Jun 2004 16:07:03 +0100 [thread overview]
Message-ID: <20040616150703.GC2969@hobbes.itsari.int> (raw)
In-Reply-To: <40D00D1F.8070109@yahoo.com.au> (from nickpiggin@yahoo.com.au on Wed, Jun 16, 2004 at 10:04:31 +0100)
On 2004.06.16 10:04, Nick Piggin wrote:
> Just simply replace put_task_struct with free_task_struct.
Sorry, only sent half of the patch the first time around. Here it is,
with the second hunk touching rwsem-spinlock.c.
This applies on top of what's currently in BK, and fixes the problems for
me -- it is compiled and boot tested, running for the last 20 minutes.
Also, linux/mm.h is needed because of free_pages().
I don't have any arch around here that actually needs rwsem-spinlock.c so
that part is untested, although it should be ok.
Marcelo, please apply.
--- linux-2.4-BK/lib/rwsem.c~fix-rwsem-race-fix 2004-06-16 14:14:02.000000000 +0100
+++ linux-2.4-BK/lib/rwsem.c 2004-06-16 14:14:28.000000000 +0100
@@ -5,6 +5,7 @@
*/
#include <linux/rwsem.h>
#include <linux/sched.h>
+#include <linux/mm.h>
#include <linux/module.h>
struct rwsem_waiter {
@@ -64,7 +65,7 @@ static inline struct rw_semaphore *__rws
mb();
waiter->task = NULL;
wake_up_process(tsk);
- put_task_struct(tsk);
+ free_task_struct(tsk);
goto out;
/* grant an infinite number of read locks to the readers at the front of the queue
@@ -96,7 +97,7 @@ static inline struct rw_semaphore *__rws
mb();
waiter->task = NULL;
wake_up_process(tsk);
- put_task_struct(tsk);
+ free_task_struct(tsk);
}
sem->wait_list.next = next;
--- linux-2.4-BK/lib/rwsem-spinlock.c~fix-rwsem-race-fix 2004-06-16 15:47:26.982774224 +0100
+++ linux-2.4-BK/lib/rwsem-spinlock.c 2004-06-16 15:51:17.522726824 +0100
@@ -9,6 +9,7 @@
*/
#include <linux/rwsem.h>
#include <linux/sched.h>
+#include <linux/mm.h>
#include <linux/module.h>
struct rwsem_waiter {
@@ -69,7 +70,7 @@ static inline struct rw_semaphore *__rws
mb();
waiter->task = NULL;
wake_up_process(tsk);
- put_task_struct(tsk);
+ free_task_struct(tsk);
goto out;
}
@@ -81,7 +82,7 @@ static inline struct rw_semaphore *__rws
mb();
waiter->task = NULL;
wake_up_process(tsk);
- put_task_struct(tsk);
+ free_task_struct(tsk);
woken++;
if (list_empty(&sem->wait_list))
break;
@@ -111,7 +112,7 @@ static inline struct rw_semaphore *__rws
mb();
waiter->task = NULL;
wake_up_process(tsk);
- put_task_struct(tsk);
+ free_task_struct(tsk);
return sem;
}
prev parent reply other threads:[~2004-06-16 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-15 16:48 [2.4] build error with latest BK Nuno Monteiro
2004-06-16 2:38 ` Nick Piggin
2004-06-16 8:20 ` David Howells
2004-06-16 8:43 ` Nick Piggin
2004-06-16 9:01 ` Mikael Pettersson
2004-06-16 9:04 ` Nick Piggin
2004-06-16 13:40 ` Nuno Monteiro
2004-06-16 13:57 ` Marcelo Tosatti
2004-06-16 15:07 ` Nuno Monteiro [this message]
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=20040616150703.GC2969@hobbes.itsari.int \
--to=nuno@itsari.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=mikpe@csd.uu.se \
--cc=nickpiggin@yahoo.com.au \
/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
all inboxes | Powered by JetHome®