Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 852
    • Issues 852
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !2232

Fix race condition in watch_add_notify

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed kn requested to merge kunjan/glib:main into main Aug 25, 2021
  • Overview 6
  • Commits 1
  • Pipelines 1
  • Changes 1

watch_add_notify gets the GNode with the cache_lock but then relesaes the cache_lock and acquires message_lock. Before that thread can acquire the message_lock another thread can call watch_remove_notify and remove the same prefix causing the GNode that was returned to thread 1 to be stale/bad.

Thread1 would then set the watch->message.watch.cache_node = cache_node; when it sends it's notifications.

This leads to the assert log and subsequently a corruption downstream

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: main