aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-grsec/frozen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/open-vm-tools-grsec/frozen.patch')
-rw-r--r--main/open-vm-tools-grsec/frozen.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/open-vm-tools-grsec/frozen.patch b/main/open-vm-tools-grsec/frozen.patch
new file mode 100644
index 0000000000..8b3fd7f379
--- /dev/null
+++ b/main/open-vm-tools-grsec/frozen.patch
@@ -0,0 +1,28 @@
+diff -urpN a/modules/linux/vmsync/sync.c b/modules/linux/vmsync/sync.c
+--- a/modules/linux/vmsync/sync.c 2012-08-01 19:02:59.000000000 -0700
++++ b/modules/linux/vmsync/sync.c 2012-10-14 07:38:18.000000000 -0700
+@@ -162,7 +162,11 @@ VmSyncThawDevices(void *_state) // IN
+ cancel_delayed_work(&state->thawTask);
+ list_for_each_safe(cur, tmp, &state->devices) {
+ dev = list_entry(cur, VmSyncBlockDevice, list);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) {
++#else
+ if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
++#endif
+ thaw_bdev(dev->bdev, dev->sb);
+ atomic_dec(&gFreezeCount);
+ }
+@@ -237,7 +241,11 @@ VmSyncAddPath(const VmSyncState *state,
+ * the superblock is already frozen.
+ */
+ if (inode->i_sb->s_bdev == NULL ||
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++ inode->i_sb->s_writers.frozen != SB_UNFROZEN) {
++#else
+ inode->i_sb->s_frozen != SB_UNFROZEN) {
++#endif
+ result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
+ compat_path_release(&nd);
+ goto exit;
+