Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/udf Revere modification of initializer; it can lead t...
details: https://anonhg.NetBSD.org/src/rev/4e4fec0f073c
branches: trunk
changeset: 359961:4e4fec0f073c
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Feb 03 09:46:26 2022 +0000
description:
Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.
diffstat:
sys/fs/udf/udf_allocation.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 23b0dd3980e2 -r 4e4fec0f073c sys/fs/udf/udf_allocation.c
--- a/sys/fs/udf/udf_allocation.c Wed Feb 02 22:43:14 2022 +0000
+++ b/sys/fs/udf/udf_allocation.c Thu Feb 03 09:46:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.46 2022/02/03 09:46:26 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.45 2022/01/28 20:00:52 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.46 2022/02/03 09:46:26 reinoud Exp $");
#endif /* not lint */
@@ -863,8 +863,8 @@
ump->vat_entries++;
}
- /* mark entry with initialiser just in case */
- lb_map = udf_rw32(0xffffffff);
+ /* mark entry with non free-space initialiser just in case */
+ lb_map = udf_rw32(0xfffffffe);
udf_vat_write(ump->vat_node, (uint8_t *) &lb_map, 4,
ump->vat_offset + lb_num *4);
ump->vat_last_free_lb = lb_num;
Home |
Main Index |
Thread Index |
Old Index