qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fcntl64 fix


From: Kirill A. Shutemov
Subject: Re: [Qemu-devel] [PATCH] fcntl64 fix
Date: Tue, 20 Mar 2007 13:43:15 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Yep. You're right. Fixed patch in the attachment.

On [Mon, 19.03.2007 17:12], Thiemo Seufer wrote:
> Kirill A. Shutemov wrote:
> > TARGET_F_*64 should be used instead of F_*64, because on 64-bit host
> > systems F_GETLK == F_GETLK64(same for SETLK and SETLKW), so we cannot
> > determinate if it's a long lock or not on a target 32-bit system.
> > Patch in the attachment.
> > 
> > P.S. Please, review my privious patches, which I have added description
> > recently. Or should I repost it?
> > 
> 
> > diff -uNr qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c 
> > qemu-0.9.0.cvs20070304/linux-user/syscall.c
> > --- qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c        2007-03-09 
> > 20:08:59 +0200
> > +++ qemu-0.9.0.cvs20070304/linux-user/syscall.c     2007-03-09 20:09:54 
> > +0200
> > @@ -4063,7 +4063,7 @@
> >  #endif
> >  
> >          switch(arg2) {
> > -        case F_GETLK64:
> > +        case TARGET_F_GETLK64:
> >              ret = get_errno(fcntl(arg1, arg2, &fl));
> 
> This changes the bug from checking the wrong flag to (potentially)
> passing down the wrong flag...
> 
> >         if (ret == 0) {
> >  #ifdef TARGET_ARM
> > @@ -4089,8 +4089,8 @@
> >         }
> >         break;
> >  
> > -        case F_SETLK64:
> > -        case F_SETLKW64:
> > +        case TARGET_F_SETLK64:
> > +        case TARGET_F_SETLKW64:
> >  #ifdef TARGET_ARM
> >              if (((CPUARMState *)cpu_env)->eabi) {
> >                  lock_user_struct(target_efl, arg3, 1);
> 
> Likewise here. We should always check TARGET_* flags and pass down the
> corresponding host flag.

Attachment: qemu-0.9.0-alt-fcntl64-fix.patch
Description: Text document

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]