|
|
Subscribe / Log in / New account

Just freeing locks? Doesn't that corrupt data?

Just freeing locks? Doesn't that corrupt data?

Posted Feb 26, 2025 9:00 UTC (Wed) by taladar (subscriber, #68407)
Parent article: A possible path for cancelable BPF programs

Isn't the idea that locks can just be freed at any time overly naive? Maybe that works for read locks but for write locks that would cause a lot of issues.

Usually write locks are held to make some changes to a data structure that should not be seen by anyone else in isolation but as a completed whole. If we just kill the program in the middle of such a change that would just leave the data structure in an undefined state forever, a much worse problem than a BPF program taking longer to finish than anticipated.


to post comments

Just freeing locks? Doesn't that corrupt data?

Posted Feb 26, 2025 10:44 UTC (Wed) by aviallon (subscriber, #157205) [Link]

I second this. Some resources just can't be released at any random time.
Or is it that BPF programs can't modify problematic resources directly anyway?


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds