tech-kern archive

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

what is this KASSERT() testing?


my devbox just crashed with this:

panic: kernel diagnostic assertion "pg == NULL || pg == PGO_DONTCARE" failed: 
file "/usr/src/sys/miscfs/genfs/genfs_io.c", line 243

but i don't understand the KASSERT().  it seems that this sequence
of events will always trigger:

                nfound = uvn_findpages(uobj, origoffset, &npages,
                    ap->a_m, UFP_NOWAIT|UFP_NOALLOC|(memwrite ? UFP_NORDONLY : 
                if (!genfs_node_rdtrylock(vp)) {
                        for (i = 0; i < npages; i++) {
                                pg = ap->a_m[i];
                                if (pg != NULL && pg != PGO_DONTCARE) {
                                        ap->a_m[i] = NULL;

                                KASSERT(pg == NULL || pg == PGO_DONTCARE);

won't all pages filled in by the uvn_findpages() be not NULL, so
if the uvn_findpages() succeeds but the genfs_node_rdtrylock() 
fails, we will trigger this assert always.

i think it should just be removed.


Home | Main Index | Thread Index | Old Index