Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • sysctl.c
Find file BlameHistoryPermalink
  • Tobias Klauser's avatar
    bpf, sysctl: Let bpf_stats_handler take a kernel pointer buffer · 7787b6fc
    Tobias Klauser authored Aug 24, 2020
    Commit 32927393 ("sysctl: pass kernel pointers to ->proc_handler")
    changed ctl_table.proc_handler to take a kernel pointer. Adjust the
    signature of bpf_stats_handler to match ctl_table.proc_handler which
    fixes the following sparse warning:
    
    kernel/sysctl.c:226:49: warning: incorrect type in argument 3 (different address spaces)
    kernel/sysctl.c:226:49:    expected void *
    kernel/sysctl.c:226:49:    got void [noderef] __user *buffer
    kernel/sysctl.c:2640:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces))
    kernel/sysctl.c:2640:35:    expected int ( [usertype] *proc_handler )( ... )
    kernel/sysctl.c:2640:35:    got int ( * )( ... )
    
    Fixes: 32927393
    
     ("sysctl: pass kernel pointers to ->proc_handler")
    Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Cc: Christoph Hellwig <hch@lst.de>
    Link: https://lore.kernel.org/bpf/20200824142047.22043-1-tklauser@distanz.ch
    7787b6fc
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7