NetBSD-Bugs archive

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

Re: kern/44144 (ifconfig causes assertion failure in vfs_lookup.c)



The following reply was made to PR kern/44144; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: apb%cequrux.com@localhost
Subject: Re: kern/44144 (ifconfig causes assertion failure in vfs_lookup.c)
Date: Sun, 26 Dec 2010 07:38:26 +0000

 On Thu, Dec 23, 2010 at 06:45:02PM +0000, Alan Barrett wrote:
  >  >  Certainly. Where's it entering ddb?
  >
  > [...]
  >  db{1}> bt
  >  mutex_enter ...
  >  vn_close ...
  >  firmware_close ...
  >  wpi_init ...
 
 Looks like garden-variety bad error branching. With luck this will fix
 both that problem and a second bad error case:
 
 Index: pci/if_wpi.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/if_wpi.c,v
 retrieving revision 1.48
 diff -u -p -r1.48 if_wpi.c
 --- pci/if_wpi.c       15 Nov 2010 05:57:39 -0000      1.48
 +++ pci/if_wpi.c       26 Dec 2010 07:36:14 -0000
 @@ -1149,7 +1149,7 @@ wpi_cache_firmware(struct wpi_softc *sc)
        /* load firmware image from disk */
        if ((error = firmware_open("if_wpi","iwlwifi-3945.ucode", &fw) != 0)) {
                aprint_error_dev(sc->sc_dev, "could not read firmware file\n");
 -              goto fail1;
 +              goto fail0;
        }
  
        wpi_firmware_size = firmware_get_size(fw);
 @@ -1168,7 +1168,7 @@ wpi_cache_firmware(struct wpi_softc *sc)
                    "truncated firmware header: %zu bytes\n",
                    wpi_firmware_size);
                error = EINVAL;
 -              goto fail2;
 +              goto fail1;
        }
  
        wpi_firmware_image = firmware_malloc(wpi_firmware_size);
 @@ -1193,6 +1193,7 @@ fail2:
        firmware_free(wpi_firmware_image, wpi_firmware_size);
  fail1:
        firmware_close(fw);
 +fail0:
        if (--wpi_firmware_users == 0)
                firmware_free(wpi_firmware_image, wpi_firmware_size);
        mutex_exit(&wpi_firmware_mutex);
 
 
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index