• Pavel Roskin's avatar
    [PCMCIA] Fix oops in validate_mem when CONFIG_PCMCIA_PROBE=n · 568c3355
    Pavel Roskin authored
    If I compile a recent 2.5.x kernel without CONFIG_ISA defined, I get
    an oops in validate_mem().  Stack trace contains 0x6b6b6b6 - a clear
    sign that freed memory is being accessed.
    
    It's the second validate_mem() in drivers/pcmcia/rsrc_mgr.c - the one
    used when CONFIG_PCMCIA_PROBE is not defined.  It turns out the memory
    is freed in do_mem_probe() when it's called from validate_mem().
    
    The solution is to use the same trick as in the first validate_mem().
    This problem is quite serious and it's not specific to the plx9052
    driver. I see it with yenta_socket as well.
    568c3355
rsrc_mgr.c 21.9 KB