lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200614062501.GA2610536@kroah.com>
Date:   Sun, 14 Jun 2020 08:25:01 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Dio Putra <dioput12@...il.com>
Cc:     devel@...verdev.osuosl.org, tkjos@...roid.com,
        linux-kernel@...r.kernel.org, arve@...roid.com,
        joel@...lfernandes.org, maco@...roid.com, christian@...uner.io
Subject: Re: [PATCH] staging: android: ashmem.c: Cleanup

On Sun, Jun 14, 2020 at 11:40:42AM +0700, Dio Putra wrote:
> Okay, my fault here. Changing the function a little bit didn't help unfortunately.
> 
> $ cd ~/git/linux/
> $ make CC=clang W=1 M=drivers/staging/android
>   CC      drivers/staging/android/ashmem.o
> drivers/staging/android/ashmem.c:418:16: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
>                         vmfile_fops = *vmfile->f_op;
>                         ~~~~~~~~~~~ ^
> drivers/staging/android/ashmem.c:370:31: note: variable 'vmfile_fops' declared const here
>         const struct file_operations vmfile_fops;
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
> drivers/staging/android/ashmem.c:419:21: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
>                         vmfile_fops.mmap = ashmem_vmfile_mmap;
>                         ~~~~~~~~~~~~~~~~ ^
> drivers/staging/android/ashmem.c:370:31: note: variable 'vmfile_fops' declared const here
>         const struct file_operations vmfile_fops;
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
> drivers/staging/android/ashmem.c:420:34: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
>                         vmfile_fops.get_unmapped_area =
>                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> drivers/staging/android/ashmem.c:370:31: note: variable 'vmfile_fops' declared const here
>         const struct file_operations vmfile_fops;
>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
> 3 errors generated.
> make[1]: *** [scripts/Makefile.build:267: drivers/staging/android/ashmem.o] Error 1
> make: *** [Makefile:1735: drivers/staging/android] Error 2
> $ 
> 
> On 6/14/20 12:37 AM, Dio Putra wrote:
> > Minor cleanup to make file_operations const once again.
> > 
> > Signed-off-by: Dio Putra <dioput12@...il.com>
> > ---
> >  drivers/staging/android/ashmem.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > base-commit: aa5af974127d317071d6225a0f3678c5f520e7ce
> > diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
> > index 8044510d8ec6..fbb6ac9ba1ab 100644
> > --- a/drivers/staging/android/ashmem.c
> > +++ b/drivers/staging/android/ashmem.c
> > @@ -367,7 +367,7 @@ ashmem_vmfile_get_unmapped_area(struct file *file, unsigned long addr,
> >  
> >  static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
> >  {
> > -	static struct file_operations vmfile_fops;
> > +	static const struct file_operations vmfile_fops;
> >  	struct ashmem_area *asma = file->private_data;
> >  	int ret = 0;
> >  

Always test-build your patches before you send them out please...

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ