tech-kern archive

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

Possible mermory corruption in if_msk.c?



Hi,

I inspected a bit the if_msk.c code. Maybe I overlooked something but I
have the feeling that there is an inconsistency between the declaration
of :

struct sk_chain_data in if_skvar.h:114:

struct sk_chain_data {
        [...]
        void *                  sk_jslots[SK_JSLOTS];
        [...]
};

and initialization of this array in if_msk.c:601

        for (i = 0; i < MSK_JSLOTS; i++) {
                sc_if->sk_cdata.sk_jslots[i] = ptr;

SK_JSLOTS is defined to 384 but MSK_JSLOTS is defined by a (magic?)
formula that evaluates to 768.

Did I miss something?

Note: after commit 1.21 from cube@ in if_msk.c, I experience much
improvement in the behaviour of my msk interface: it's now usable for a
few hours, but then usually hangs randomly (not necessarily under heavy
load). An ifconfig down and then up can restore the interface into a
working state after it has hung.

Cheers,
Anthony Mallet


Home | Main Index | Thread Index | Old Index