linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug
@ 2008-12-05 16:41 Heiko Carstens
  2008-12-05 22:06 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Carstens @ 2008-12-05 16:41 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Martin Schwidefsky, linux-next, Stephen Rothwell

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! ;)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug
  2008-12-05 16:41 linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug Heiko Carstens
@ 2008-12-05 22:06 ` Jens Axboe
  2008-12-06 12:53   ` Heiko Carstens
  2008-12-09 11:21   ` Kamalesh Babulal
  0 siblings, 2 replies; 4+ messages in thread
From: Jens Axboe @ 2008-12-05 22:06 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Martin Schwidefsky, linux-next, Stephen Rothwell

On Fri, Dec 05 2008, Heiko Carstens wrote:
> 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! ;)

Something like this?

diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index ef3635b..0767827 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -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;

-- 
Jens Axboe

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug
  2008-12-05 22:06 ` Jens Axboe
@ 2008-12-06 12:53   ` Heiko Carstens
  2008-12-09 11:21   ` Kamalesh Babulal
  1 sibling, 0 replies; 4+ messages in thread
From: Heiko Carstens @ 2008-12-06 12:53 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Martin Schwidefsky, linux-next, Stephen Rothwell

On Fri, Dec 05, 2008 at 11:06:35PM +0100, Jens Axboe wrote:
> On Fri, Dec 05 2008, Heiko Carstens wrote:
> > 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! ;)
> 
> Something like this?
> 
> diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
> index ef3635b..0767827 100644
> --- a/arch/s390/mm/pgtable.c
> +++ b/arch/s390/mm/pgtable.c
> @@ -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;

Yes, exactly. Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug
  2008-12-05 22:06 ` Jens Axboe
  2008-12-06 12:53   ` Heiko Carstens
@ 2008-12-09 11:21   ` Kamalesh Babulal
  1 sibling, 0 replies; 4+ messages in thread
From: Kamalesh Babulal @ 2008-12-09 11:21 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Heiko Carstens, Martin Schwidefsky, linux-next, Stephen Rothwell

* Jens Axboe <jens.axboe@oracle.com> [2008-12-05 23:06:35]:

> On Fri, Dec 05 2008, Heiko Carstens wrote:
> > 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! ;)
> 
> Something like this?

Hi Jens,

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

Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> 
> diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
> index ef3635b..0767827 100644
> --- a/arch/s390/mm/pgtable.c
> +++ b/arch/s390/mm/pgtable.c
> @@ -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;
> 
> -- 
> Jens Axboe
> 

-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-09 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-05 16:41 linux-next: "aio: make the lookup_ioctx() lockless" causes s390 build bug Heiko Carstens
2008-12-05 22:06 ` Jens Axboe
2008-12-06 12:53   ` Heiko Carstens
2008-12-09 11:21   ` Kamalesh Babulal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).