svn commit: r244695 - head/sys/dev/pci
David Xu
davidxu at FreeBSD.org
Wed Dec 26 13:07:17 UTC 2012
Author: davidxu
Date: Wed Dec 26 13:07:17 2012
New Revision: 244695
URL: http://svnweb.freebsd.org/changeset/base/244695
Log:
Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine
panics with:
free: address xxx(yyy) has not been allocated.
it can be triggered by hald.
Modified:
head/sys/dev/pci/pci_user.c
Modified: head/sys/dev/pci/pci_user.c
==============================================================================
--- head/sys/dev/pci/pci_user.c Wed Dec 26 08:20:27 2012 (r244694)
+++ head/sys/dev/pci/pci_user.c Wed Dec 26 13:07:17 2012 (r244695)
@@ -425,12 +425,12 @@ pci_ioctl(struct cdev *dev, u_long cmd,
#ifdef COMPAT_FREEBSD32
struct pci_conf_io32 *cio32 = NULL;
struct pci_conf_old32 conf_old32;
- struct pci_match_conf_old32 *pattern_buf_old32;
+ struct pci_match_conf_old32 *pattern_buf_old32 = NULL;
#endif
struct pci_conf_old conf_old;
struct pci_io iodata;
struct pci_io_old *io_old;
- struct pci_match_conf_old *pattern_buf_old;
+ struct pci_match_conf_old *pattern_buf_old = NULL;
io_old = NULL;
@@ -470,10 +470,8 @@ pci_ioctl(struct cdev *dev, u_long cmd,
#ifdef PRE7_COMPAT
#ifdef COMPAT_FREEBSD32
case PCIOCGETCONF_OLD32:
- pattern_buf_old32 = NULL;
#endif
case PCIOCGETCONF_OLD:
- pattern_buf_old = NULL;
#endif
case PCIOCGETCONF:
More information about the svn-src-head
mailing list