Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs Fix wrong assertion, the negatiopn of "a && b" i...
details: https://anonhg.NetBSD.org/src/rev/79ccee436e46
branches: trunk
changeset: 361987:79ccee436e46
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Feb 21 17:07:45 2022 +0000
description:
Fix wrong assertion, the negatiopn of "a && b" is "!a || !b" so we
need "DIP(ip, blocks) != 0" here.
Should fix PR kern/56725 (Panic when ls directory with device nodes
on an older ffs)
diffstat:
sys/ufs/ufs/ufs_readwrite.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 4460f869865c -r 79ccee436e46 sys/ufs/ufs/ufs_readwrite.c
--- a/sys/ufs/ufs/ufs_readwrite.c Mon Feb 21 08:15:05 2022 +0000
+++ b/sys/ufs/ufs/ufs_readwrite.c Mon Feb 21 17:07:45 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_readwrite.c,v 1.127 2021/10/20 03:08:19 thorpej Exp $ */
+/* $NetBSD: ufs_readwrite.c,v 1.128 2022/02/21 17:07:45 hannken Exp $ */
/*-
* Copyright (c) 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: ufs_readwrite.c,v 1.127 2021/10/20 03:08:19 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ufs_readwrite.c,v 1.128 2022/02/21 17:07:45 hannken Exp $");
#define FS struct fs
#define I_FS i_fs
@@ -142,7 +142,7 @@
KASSERT(vp->v_type != VLNK || ip->i_size >= ump->um_maxsymlinklen);
KASSERT(vp->v_type != VLNK || ump->um_maxsymlinklen != 0 ||
- DIP(ip, blocks) == 0);
+ DIP(ip, blocks) != 0);
if (uio->uio_offset > ump->um_maxfilesize)
return EFBIG;
Home |
Main Index |
Thread Index |
Old Index