Skip to contentSkip to conversation

linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug

DISCUSSION Heiko Carstens 3 participants 4 messages Dec 5, 2008 – Dec 9, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Jens,

your patch "aio: make the lookup_ioctx() lockless" in linux-next causes this build bug on s390:

arch/s390/mm/pgtable.c: In function 's390_enable_sie':

arch/s390/mm/pgtable.c:266: error: invalid operands to binary || (have 'int' and 'struct hlist_head')
arch/s390/mm/pgtable.c:282: error: invalid operands to binary || (have 'int' and 'struct hlist_head')

make[1]: *** [arch/s390/mm/pgtable.o] Error 1
make: *** [arch/s390/mm] Error 2

Could you please fix that? Thanks! ;)

#1 lore raw
Quoted 5 lines · Heiko Carstens

Hi Jens,

your patch "aio: make the lookup_ioctx() lockless" in linux-next causes this build bug on s390:

Quoted 7 lines

arch/s390/mm/pgtable.c: In function 's390_enable_sie':

arch/s390/mm/pgtable.c:266: error: invalid operands to binary || (have 'int' and 'struct hlist_head')
arch/s390/mm/pgtable.c:282: error: invalid operands to binary || (have 'int' and 'struct hlist_head')

make[1]: *** [arch/s390/mm/pgtable.o] Error 1
make: *** [arch/s390/mm] Error 2

Could you please fix that? Thanks! ;)

Something like this?

arch/s390/mm/pgtable.c +2 -2
index ef3635b..0767827 100644
@@ -263,7 +263,7 @@ int s390_enable_sie(void)
 	/* lets check if we are allowed to replace the mm */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		task_unlock(tsk);
 		return -EINVAL;
 	}
@@ -279,7 +279,7 @@ int s390_enable_sie(void)
 	/* Now lets check again if something happened */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		mmput(mm);
 		task_unlock(tsk);
 		return -EINVAL;
Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 30 lines · Jens Axboe
Quoted 5 lines · Heiko Carstens

Hi Jens,

your patch "aio: make the lookup_ioctx() lockless" in linux-next causes this build bug on s390:

Quoted 7 lines

arch/s390/mm/pgtable.c: In function 's390_enable_sie':

arch/s390/mm/pgtable.c:266: error: invalid operands to binary || (have 'int' and 'struct hlist_head')
arch/s390/mm/pgtable.c:282: error: invalid operands to binary || (have 'int' and 'struct hlist_head')

make[1]: *** [arch/s390/mm/pgtable.o] Error 1
make: *** [arch/s390/mm] Error 2

Could you please fix that? Thanks! ;)

Something like this?

arch/s390/mm/pgtable.c +1 -1
index ef3635b..0767827 100644
@@ -263,7 +263,7 @@ int s390_enable_sie(void)
 	/* lets check if we are allowed to replace the mm */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		task_unlock(tsk);
 		return -EINVAL;
 	}

arch/s390/mm/pgtable.c int s390_enable_sie(void) · line 285

Quoted 8 lines
arch/s390/mm/pgtable.c +1 -1
@@ -279,7 +279,7 @@ int s390_enable_sie(void)
 	/* Now lets check again if something happened */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		mmput(mm);
 		task_unlock(tsk);
 		return -EINVAL;

Yes, exactly. Thanks!

#3 lore raw
In reply to Jens Axboe
Quoted 12 lines · Jens Axboe
Quoted 11 lines · Heiko Carstens

Hi Jens,

your patch "aio: make the lookup_ioctx() lockless" in linux-next causes this build bug on s390:

arch/s390/mm/pgtable.c: In function 's390_enable_sie':

arch/s390/mm/pgtable.c:266: error: invalid operands to binary || (have 'int' and 'struct hlist_head')
arch/s390/mm/pgtable.c:282: error: invalid operands to binary || (have 'int' and 'struct hlist_head')

make[1]: *** [arch/s390/mm/pgtable.o] Error 1
make: *** [arch/s390/mm] Error 2

Quoted 3 lines
Quoted 1 line

Could you please fix that? Thanks! ;)

Something like this?

Hi Jens,

Thank you for the patch, it fixes the build failure.

Quoted 27 lines
arch/s390/mm/pgtable.c +2 -2
index ef3635b..0767827 100644
@@ -263,7 +263,7 @@ int s390_enable_sie(void)
 	/* lets check if we are allowed to replace the mm */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		task_unlock(tsk);
 		return -EINVAL;
 	}
@@ -279,7 +279,7 @@ int s390_enable_sie(void)
 	/* Now lets check again if something happened */
 	task_lock(tsk);
 	if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-	    tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+	    tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
 		mmput(mm);
 		task_unlock(tsk);
 		return -EINVAL;
Signature · 2 lines
-- 
Jens Axboe
Signature · 4 lines
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.