29 lines
898 B
Diff
29 lines
898 B
Diff
From 5124401571fa1807a6595659ab7a069f17fe1068 Mon Sep 17 00:00:00 2001
|
|
From: William Brown <william@blackhats.net.au>
|
|
Date: Tue, 27 Aug 2019 10:01:54 +1000
|
|
Subject: [PATCH] OPD deadlock: RH BZ 1349779
|
|
|
|
---
|
|
db/db_cam.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/db/db_cam.c b/db/db_cam.c
|
|
index 4c1322d..7f133e5 100644
|
|
--- a/db/db_cam.c
|
|
+++ b/db/db_cam.c
|
|
@@ -850,6 +850,11 @@ __dbc_iget(dbc, key, data, flags)
|
|
flags == DB_PREV || flags == DB_PREV_DUP)) {
|
|
if (tmp_rmw && (ret = dbc->am_writelock(dbc)) != 0)
|
|
goto err;
|
|
+ /* Latch the primary tree page here in order to not deadlock later. */
|
|
+ if (cp->page == NULL &&
|
|
+ (ret = __memp_fget(mpf, &cp->pgno,
|
|
+ dbc->thread_info, dbc->txn, 0, &cp->page)) != 0)
|
|
+ goto err;
|
|
if (F_ISSET(dbc, DBC_TRANSIENT))
|
|
opd = cp->opd;
|
|
else if ((ret = __dbc_idup(cp->opd, &opd, DB_POSITION)) != 0)
|
|
--
|
|
2.20.1 (Apple Git-117)
|
|
|