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
You need to sign in or sign up before continuing.
  • linux
  • lib
  • stackdepot.c
Find file BlameHistoryPermalink
  • Imran Khan's avatar
    lib, stackdepot: check stackdepot handle before accessing slabs · 4d4712c1
    Imran Khan authored Nov 08, 2021
    Patch series "lib, stackdepot: check stackdepot handle before accessing slabs", v2.
    
    PATCH-1: Checks validity of a stackdepot handle before proceeding to
    access stackdepot slab/objects.
    
    PATCH-2: Adds a helper in stackdepot, to allow users to print stack
    entries just by specifying the stackdepot handle.  It also changes such
    users to use this new interface.
    
    PATCH-3: Adds a helper in stackdepot, to allow users to print stack
    entries into buffers just by specifying the stackdepot handle and
    destination buffer.  It also changes such users to use this new interface.
    
    This patch (of 3):
    
    stack_depot_save allocates slabs that will be used for storing objects in
    future.If this slab allocation fails we may get to a situation where space
    allocation for a new stack_record fails, causing stack_depot_save to
    return 0 as handle.  If user of this handle ends up invoking
    stack_depot_fetch with this handle value, current implementation of
    stack_depot_fetch will end up using slab from wrong index.  To avoid this
    check handle value at the beginning.
    
    Link: https://lkml.kernel.org/r/20210915175321.3472770-1-imran.f.khan@oracle.com
    Link: https://lkml.kernel.org/r/20210915014806.3206938-1-imran.f.khan@oracle.com
    Link: https://lkml.kernel.org/r/20210915014806.3206938-2-imran.f.khan@oracle.com
    
    
    Signed-off-by: default avatarImran Khan <imran.f.khan@oracle.com>
    Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    4d4712c1
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7