lkml.org 
[lkml]   [2014]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/13] kexec: Make kexec_segment user buffer pointer a union
On Tue, Jun 03, 2014 at 09:06:54AM -0400, Vivek Goyal wrote:
> So far kexec_segment->buf was always a user space pointer as user space
> passed the array of kexec_segment structures and kernel copied it.
>
> But with new system call, list of kexec segments will be prepared by
> kernel and kexec_segment->buf will point to a kernel memory.
>
> So while I was adding code where I made assumption that ->buf is pointing
> to kernel memory, sparse started giving warning.
>
> Make ->buf a union. And where a user space pointer is expected, access
> it using ->buf and where a kernel space pointer is expected, access it
> using ->kbuf. That takes care of sparse warnings.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

Acked-by: Borislav Petkov <bp@suse.de>

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-06-04 13:01    [W:0.619 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site