11 Commits

Author SHA1 Message Date
Jing Chen be48200c0e Re-order loads in BUILD files to make transformations reversible in Copybara.
PiperOrigin-RevId: 598898756
2024-01-16 11:21:40 -08:00
Andrei Vagin 5f4abad306 Fix a few typos
It is an idea of running codespell as part of our presubmit checks.
Before enabling it for new changes, let's fix what it has found.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2023-10-25 12:13:42 -07:00
Adin Scannell 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Andrei Vagin 426deb60fd lockdep: fix the TOCTTOU issue
The problem is that it checkes circular dependencies and one then adds the
target lock to the graph.

Reported-by: syzbot+7687e27a2029723c7fb4@syzkaller.appspotmail.com
PiperOrigin-RevId: 512637945
2023-02-27 08:49:01 -08:00
Etienne Perot 445fa6f40c Lockdep: Print more info in the "unbalanced unlock" case.
This CL does the following:

- Add the ability for nested locks to have names.
- Give names to all current uses of nested locks in the codebase.
- Truncate `lockdep` debug stack traces to avoid the clutter from the
  `lockdep` code itself
- Simplify `lockdep` to not longer require `classMap`.

PiperOrigin-RevId: 491486620
2022-11-28 17:53:09 -08:00
Andrei Vagin 605841baad lockdep: print more info for the unbalance unlock case
* print a lock type
* print a list of taken locks

PiperOrigin-RevId: 454310284
2022-06-11 00:22:29 -07:00
Nicolas Lacasse 1d70ac89c5 Typo fix: unknow -> unknown
PiperOrigin-RevId: 454205194
2022-06-10 11:25:45 -07:00
Andrei Vagin 8b41af9330 sync/lockdep: use RangeRepeatable instead of Range
It is lockless and so it guarantes to avoid nested locks (deadlocks).

Reported-by: syzbot+7f2b94fef2e1109bcd40@syzkaller.appspotmail.com
2022-06-09 12:00:42 -07:00
Ayush Ranjan bda5ce7977 Simplify codebase.
Ran gofmt -w -s ./

PiperOrigin-RevId: 449415155
2022-05-18 00:56:31 -07:00
Ayush Ranjan f6ed4523dc Reformat codebase.
PiperOrigin-RevId: 449358041
2022-05-17 17:48:35 -07:00
Andrei Vagin 3aab92297a Add new locks with the correctness validator
All locks are separated into classes. The validator builds a dependency
graph and checks that it doesn't have cycles.

PiperOrigin-RevId: 447812244
2022-05-10 13:24:51 -07:00