Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 459914 - sys-fs/lvm2-* - unsafe lockfile removal
Summary: sys-fs/lvm2-* - unsafe lockfile removal
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Robin Johnson
URL: https://www.redhat.com/archives/linux...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-03-01 19:22 UTC by Jaco Kroon
Modified: 2014-02-01 21:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to remove lockfile unlinking (LVM2.2.02.98-no-flock-unlink.patch,522 bytes, patch)
2013-03-01 19:35 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2013-03-01 19:22:24 UTC
lvm2 uses flock to lock files.  In the provided link I explain why this is unsafe.

The only mechanism that can possibly avoid the potential issues here is to never ever unlink the lock file.

Reproducible: Always
Comment 1 Jaco Kroon 2013-03-01 19:35:43 UTC
Created attachment 340686 [details, diff]
patch to remove lockfile unlinking

This is the only instance of unlink in the codebase that seems to have relation to lockfiles and as such should be the only instance that we absolutely HAVE to remove.

Patch is compile tested and run-tested and confirmed to no longer remove the lock files.
Comment 2 Alasdair Kergon 2013-03-05 15:49:10 UTC
Leaving dead lockfiles around is not acceptable and it should be safe to remove them in the manner in which the code is doing this: investigations are continuing.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-02-01 21:23:06 UTC
Closing as upstream issue since agk is looking at it, please reopen if unresolved in 2.02.105.