Skip to contentSkip to conversation

use simpler test_task_thread to test current ti flags

PATCH In review Serge E. Hallyn 2 participants 2 messages Jan 28, 2010 – Feb 5, 2010 1 message not in the archive s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use simpler test_task_thread to test current ti flags

This ought to be folded into the
'fix 31-bit s390 checkpoint/restart wrappers'
patch which I sent earlier today. Not a bug without it, just not as nice.

---
 arch/s390/kernel/checkpoint.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/s390/kernel/checkpoint.c +2 -1
index 8ec12c6..60ba04d 100644
@@ -148,7 +148,8 @@ int checkpoint_mm_context(struct ckpt_ctx *ctx, struct mm_struct *mm)
 
 int restore_thread(struct ckpt_ctx *ctx)
 {
-	if (test_tsk_thread_flag(current, TIF_31BIT)) {
+	/* a 31-bit task cannot call sys_restart right now */
+	if (test_thread_flag(TIF_31BIT)) {
 		ckpt_err(ctx, -EINVAL, "restart from 31-bit task\n");
 		return -EINVAL;
 	}
Signature · 1 line
1.6.1

A message that is not in the archive (sent off-list or not yet received): 20100128233311.GA9890-r/[email protected]

#2 lore raw

Got it.

Quoted 24 lines · Serge E. Hallyn

This ought to be folded into the
'fix 31-bit s390 checkpoint/restart wrappers'
patch which I sent earlier today. Not a bug without it, just not as nice.

---
 arch/s390/kernel/checkpoint.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/s390/kernel/checkpoint.c +2 -1
index 8ec12c6..60ba04d 100644
@@ -148,7 +148,8 @@ int checkpoint_mm_context(struct ckpt_ctx *ctx, struct mm_struct *mm)
 
 int restore_thread(struct ckpt_ctx *ctx)
 {
-	if (test_tsk_thread_flag(current, TIF_31BIT)) {
+	/* a 31-bit task cannot call sys_restart right now */
+	if (test_thread_flag(TIF_31BIT)) {
 		ckpt_err(ctx, -EINVAL, "restart from 31-bit task\n");
 		return -EINVAL;
 	}