Re: [2.4] build error with latest BK

From: Nuno Monteiro
Date: Wed Jun 16 2004 - 08:44:38 EST


On 2004.06.16 10:04, Nick Piggin wrote:
> Just simply replace put_task_struct with free_task_struct.

Like this, maybe? It applies on top of what's currently in BK -- it fixed
it for me, compiled and boot tested, running for the last 20 minutes.
Also, linux/mm.h is needed because of free_pages().

Marcelo, please apply.


--- linux-2.4-BK/lib/rwsem.c~fix-rwsem-race-fix 2004-06-16 14:14:02.187159768 +0100
+++ linux-2.4-BK/lib/rwsem.c 2004-06-16 14:14:28.905098024 +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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/