]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/commit
Merge r191434 from stable/7 to releng/7.2:
authorrwatson <rwatson@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 23 Apr 2009 18:23:08 +0000 (18:23 +0000)
committerrwatson <rwatson@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 23 Apr 2009 18:23:08 +0000 (18:23 +0000)
commit30b6a19389049189370527c74808b86351244a11
tree5650c800b09741ad9a1bc3588f0f138284814d7c
parentb5f3ba584394d4481f654dd32d70e1fef40fb44f
Merge r191434 from stable/7 to releng/7.2:

  In sysctl_ifdata(), query the ifnet pointer using the index only
  once, rather than querying it, validating it, and then re-querying
  it without validating it.  This may avoid a NULL pointer
  dereference and resulting kernel page fault if an interface is
  being deleted while bsnmp or other tools are querying data on the
  interface.

  The full fix, to properly refcount the interface for the duration
  of the sysctl, is in 8.x, but is considered too high-risk for
  7.2, so instead will appear in 7.3 (if all goes well).

  Reported by:  mdtancsa

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/releng/7.2@191435 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/net/if_mib.c