pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal 7+ messages / 1 participants [nested] [flat]
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/ba51774d87a2a0402628f7bd68295c0b2913cc25 Modified Files -------------- src/backend/storage/lmgr/lock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/3d3bc2905f2ed6a4858501031c086383be7bcf6a Modified Files -------------- src/backend/storage/lmgr/lock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e32c5f118ec2da80fd76da1241dd721ceb3e9127 Modified Files -------------- src/backend/storage/lmgr/lock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/7e6e3bdd3c36d77b8a611dbf5e8c72164bc6108b Modified Files -------------- src/backend/storage/lmgr/lock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/ac0c71228fe7e44d9eba130df9bbbb5c2bfa9faa Modified Files -------------- src/backend/storage/lmgr/lock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/553ce7e9a8d147cae75f0656a628c29dcbe498d8 Modified Files -------------- src/backend/storage/lmgr/lock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal @ 2015-09-20 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2015-09-20 20:49 UTC (permalink / raw) To: pgsql-committers Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock(). RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches. Branch ------ REL9_0_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/eed5bbc48026976444dc020086559acc8e6f26ca Modified Files -------------- src/backend/storage/lmgr/lock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2015-09-20 20:49 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us> 2015-09-20 20:49 pgsql: Be more wary about partially-valid LOCALLOCK data in RemoveLocal Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox