Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Panic: vrelel: bad ref count (9.99.54)



Dear Chuck,

On 2020-11-27, Chuck Silvers wrote:
> Hi Yorick,
> 
> On Fri, Nov 27, 2020 at 06:29:07PM +0200, Yorick Hardy wrote:
> > 
> > I think that uvm_mremap did not keep pace with changes in uvm.
> > This patch seems to fix it for me, although I have only tested
> > for two days so far (I am usually able to trigger the panic by
> > now ... but lets see).
> 
> Your patch looks good, please go ahead and commit it.
> 
> -Chuck

Thanks! May I ask if you have an opinion on this patch? I have
not noticed any bad behaviour if it is omitted but, if I read
the code correctly, I don't think it is correct to fall through
for this case.

-- 
Kind regards,

Yorick Hardy

Index: uvm_map.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_map.c,v
retrieving revision 1.385
diff -u -r1.385 uvm_map.c
--- uvm_map.c	9 Jul 2020 05:57:15 -0000	1.385
+++ uvm_map.c	19 Nov 2020 16:04:07 -0000
@@ -1477,6 +1477,13 @@
 				    amapwaitflag | AMAP_EXTEND_BACKWARDS))
 					goto nomerge;
 			}
+
+			/*
+			 * We could not extend either amap, just skip on.
+			 */
+			else {
+				goto nomerge;
+			}
 		} else {
 			/*
 			 * Pull the next entry's amap backwards to cover this


Home | Main Index | Thread Index | Old Index