mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
scst: Use designated initializers for sys_alloc_fns
Designated initializers are required for GCC to safely implement RANDSTRUCT, a GCC plugin pulled from the Grsecurity patch set upstream ~2017. Fix the compile error caused by implementation of sys_alloc_fns by rewriting the struct with designated members. See also https://github.com/bvanassche/scst/pull/17. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1253,7 +1253,9 @@ struct scatterlist *scst_alloc_sg(int size, gfp_t gfp_mask, int *count)
|
||||
struct scatterlist *res;
|
||||
int pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
|
||||
struct sgv_pool_alloc_fns sys_alloc_fns = {
|
||||
sgv_alloc_sys_pages, sgv_free_sys_sg_entries };
|
||||
.alloc_pages_fn = sgv_alloc_sys_pages,
|
||||
.free_pages_fn = sgv_free_sys_sg_entries,
|
||||
};
|
||||
int no_fail = ((gfp_mask & __GFP_NOFAIL) == __GFP_NOFAIL);
|
||||
int cnt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user