Re: svn commit: r196358 - in head: share/man/man9 sys/kern sys/sys

2009-08-19 Thread Bruce Evans

On Tue, 18 Aug 2009, Pawel Jakub Dawidek wrote:


On Tue, Aug 18, 2009 at 08:06:17PM +0200, Attilio Rao wrote:

2009/8/18 Sam Leffler s...@errno.com:

Pawel Jakub Dawidek wrote:

Log:
 Remove unused taskqueue_find() function.
   Reviewed by:  dfr
 Approved by:  re (kib)


I don't understand why this should be removed (let alone during a code
freeze).  I can think of several uses for this function including a ddb cmd
that takes a taskq name and dumps it's contents.  The overhead of
maintaining the global list appears minimal.


FWIW, I agree with Sam.


The only use I could think of was exactly what Sam suggested - a DDB
command and that was the only possible use I found.


And ddb cannot call it, since it uses locks unconditionally.

Bruce
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196376 - head/sys/netinet

2009-08-19 Thread Michael Tuexen
Author: tuexen
Date: Wed Aug 19 12:02:28 2009
New Revision: 196376
URL: http://svn.freebsd.org/changeset/base/196376

Log:
  Fix a bug in the handling of unreliable messages
  which results in stalled associations.
  
  Approved by: re, rrs (mentor)
  MFC after: immediately

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Wed Aug 19 03:58:12 2009(r196375)
+++ head/sys/netinet/sctputil.c Wed Aug 19 12:02:28 2009(r196376)
@@ -4667,8 +4667,10 @@ sctp_release_pr_sctp_chunk(struct sctp_t
stcb-asoc.peers_rwnd += tp1-send_size;
stcb-asoc.peers_rwnd += 
SCTP_BASE_SYSCTL(sctp_peer_chunk_oh);
sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
-   sctp_m_freem(tp1-data);
-   tp1-data = NULL;
+   if (tp1-data) {
+   sctp_m_freem(tp1-data);
+   tp1-data = NULL;
+   }
do_wakeup_routine = 1;
if (PR_SCTP_BUF_ENABLED(tp1-flags)) {
stcb-asoc.sent_queue_cnt_removeable--;
@@ -4715,12 +4717,14 @@ next_on_sent:
 */
chk = tp1;
ret_sz += tp1-book_size;
-   sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
sctp_free_bufspace(stcb, stcb-asoc, tp1, 1);
-   sctp_m_freem(tp1-data);
+   sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
+   if (tp1-data) {
+   sctp_m_freem(tp1-data);
+   tp1-data = NULL;
+   }
/* No flight involved here book the size to 0 */
tp1-book_size = 0;
-   tp1-data = NULL;
if (tp1-rec.data.rcv_flags  SCTP_DATA_LAST_FRAG) {
foundeom = 1;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196377 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet

2009-08-19 Thread Michael Tuexen
Author: tuexen
Date: Wed Aug 19 12:12:51 2009
New Revision: 196377
URL: http://svn.freebsd.org/changeset/base/196377

Log:
  Fix a bug in the handling of unreliable messages which
  results in stalled associations.
  
  Approved by: re, rrs (mentor)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/sctputil.c

Modified: stable/8/sys/netinet/sctputil.c
==
--- stable/8/sys/netinet/sctputil.c Wed Aug 19 12:02:28 2009
(r196376)
+++ stable/8/sys/netinet/sctputil.c Wed Aug 19 12:12:51 2009
(r196377)
@@ -4667,8 +4667,10 @@ sctp_release_pr_sctp_chunk(struct sctp_t
stcb-asoc.peers_rwnd += tp1-send_size;
stcb-asoc.peers_rwnd += 
SCTP_BASE_SYSCTL(sctp_peer_chunk_oh);
sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
-   sctp_m_freem(tp1-data);
-   tp1-data = NULL;
+   if (tp1-data) {
+   sctp_m_freem(tp1-data);
+   tp1-data = NULL;
+   }
do_wakeup_routine = 1;
if (PR_SCTP_BUF_ENABLED(tp1-flags)) {
stcb-asoc.sent_queue_cnt_removeable--;
@@ -4715,12 +4717,14 @@ next_on_sent:
 */
chk = tp1;
ret_sz += tp1-book_size;
-   sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
sctp_free_bufspace(stcb, stcb-asoc, tp1, 1);
-   sctp_m_freem(tp1-data);
+   sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, 
so_locked);
+   if (tp1-data) {
+   sctp_m_freem(tp1-data);
+   tp1-data = NULL;
+   }
/* No flight involved here book the size to 0 */
tp1-book_size = 0;
-   tp1-data = NULL;
if (tp1-rec.data.rcv_flags  SCTP_DATA_LAST_FRAG) {
foundeom = 1;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196378 - head/sys/kern

2009-08-19 Thread Ed Schouten
Author: ed
Date: Wed Aug 19 14:30:46 2009
New Revision: 196378
URL: http://svn.freebsd.org/changeset/base/196378

Log:
  Small changes to the warning message generated by pty(4):
  
  - Only print the warning once, instead of filling up the screen.
  - Use the word legacy for the pty_warningcnt description, to prevent
confusion.
  - Use log() instead of printf().
  
  Discussed with:   rwatson, jhb
  Approved by:  re (kib)

Modified:
  head/sys/kern/tty_pty.c

Modified: head/sys/kern/tty_pty.c
==
--- head/sys/kern/tty_pty.c Wed Aug 19 12:12:51 2009(r196377)
+++ head/sys/kern/tty_pty.c Wed Aug 19 14:30:46 2009(r196378)
@@ -37,6 +37,7 @@ __FBSDID($FreeBSD$);
 #include sys/kernel.h
 #include sys/proc.h
 #include sys/sysctl.h
+#include sys/syslog.h
 #include sys/systm.h
 #include sys/tty.h
 
@@ -47,10 +48,10 @@ __FBSDID($FreeBSD$);
  * si_drv1 inside the cdev to mark whether the PTY is in use.
  */
 
-static unsigned int pty_warningcnt = 10;
+static unsigned int pty_warningcnt = 1;
 SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW,
pty_warningcnt, 0,
-   Warnings that will be triggered upon PTY allocation);
+   Warnings that will be triggered upon legacy PTY allocation);
 
 static int
 ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
@@ -74,7 +75,7 @@ ptydev_fdopen(struct cdev *dev, int ffla
/* Raise a warning when a legacy PTY has been allocated. */
if (pty_warningcnt  0) {
pty_warningcnt--;
-   printf(pid %d (%s) is using legacy pty devices%s\n, 
+   log(LOG_INFO, pid %d (%s) is using legacy pty devices%s\n, 
td-td_proc-p_pid, td-td_name,
pty_warningcnt ?  :  - not logging anymore);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196379 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern

2009-08-19 Thread Ed Schouten
Author: ed
Date: Wed Aug 19 14:38:43 2009
New Revision: 196379
URL: http://svn.freebsd.org/changeset/base/196379

Log:
  MFC r196378:
  
Small changes to the warning message generated by pty(4):
  
- Only print the warning once, instead of filling up the screen.
- Use the word legacy for the pty_warningcnt description, to prevent
  confusion.
- Use log() instead of printf().
  
Discussed with: rwatson, jhb
Approved by:re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/tty_pty.c

Modified: stable/8/sys/kern/tty_pty.c
==
--- stable/8/sys/kern/tty_pty.c Wed Aug 19 14:30:46 2009(r196378)
+++ stable/8/sys/kern/tty_pty.c Wed Aug 19 14:38:43 2009(r196379)
@@ -37,6 +37,7 @@ __FBSDID($FreeBSD$);
 #include sys/kernel.h
 #include sys/proc.h
 #include sys/sysctl.h
+#include sys/syslog.h
 #include sys/systm.h
 #include sys/tty.h
 
@@ -47,10 +48,10 @@ __FBSDID($FreeBSD$);
  * si_drv1 inside the cdev to mark whether the PTY is in use.
  */
 
-static unsigned int pty_warningcnt = 10;
+static unsigned int pty_warningcnt = 1;
 SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW,
pty_warningcnt, 0,
-   Warnings that will be triggered upon PTY allocation);
+   Warnings that will be triggered upon legacy PTY allocation);
 
 static int
 ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
@@ -74,7 +75,7 @@ ptydev_fdopen(struct cdev *dev, int ffla
/* Raise a warning when a legacy PTY has been allocated. */
if (pty_warningcnt  0) {
pty_warningcnt--;
-   printf(pid %d (%s) is using legacy pty devices%s\n, 
+   log(LOG_INFO, pid %d (%s) is using legacy pty devices%s\n, 
td-td_proc-p_pid, td-td_name,
pty_warningcnt ?  :  - not logging anymore);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196381 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/usb dev/xen/xenpci

2009-08-19 Thread Rafal Jaworowski
Author: raj
Date: Wed Aug 19 14:48:59 2009
New Revision: 196381
URL: http://svn.freebsd.org/changeset/base/196381

Log:
  MFC r196380
  
  Fix USB cache sync operations for platforms with non-coherent DMA.
  
  - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
the low level bus dma sync operation is implementation dependent and we
cannot assume the required order of operations to be guaranteed.
  
  - usb_pc_cpu_flush() is called before writing to a device, so
BUS_DMASYNC_PREWRITE should be used.
  
  Submitted by: Grzegorz Bernacki
  Reviewed by:  HPS, arm@, usb@ ML
  Tested by:HPS, Mike Tancsa
  Approved by:  re (kib)
  Obtained from:Semihalf

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/usb/usb_busdma.c
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/usb_busdma.c
==
--- stable/8/sys/dev/usb/usb_busdma.c   Wed Aug 19 14:39:08 2009
(r196380)
+++ stable/8/sys/dev/usb/usb_busdma.c   Wed Aug 19 14:48:59 2009
(r196381)
@@ -679,8 +679,8 @@ usb_pc_cpu_invalidate(struct usb_page_ca
/* nothing has been loaded into this page cache! */
return;
}
-   bus_dmamap_sync(pc-tag, pc-map,
-   BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
+   bus_dmamap_sync(pc-tag, pc-map, BUS_DMASYNC_POSTREAD);
+   bus_dmamap_sync(pc-tag, pc-map, BUS_DMASYNC_PREREAD);
 }
 
 /**
@@ -693,8 +693,7 @@ usb_pc_cpu_flush(struct usb_page_cache *
/* nothing has been loaded into this page cache! */
return;
}
-   bus_dmamap_sync(pc-tag, pc-map,
-   BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
+   bus_dmamap_sync(pc-tag, pc-map, BUS_DMASYNC_PREWRITE);
 }
 
 /**
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196382 - head/contrib/top

2009-08-19 Thread John Baldwin
Author: jhb
Date: Wed Aug 19 15:17:13 2009
New Revision: 196382
URL: http://svn.freebsd.org/changeset/base/196382

Log:
  Explicitly line up the CPU state labels with the calculated starting column
  that takes into account the width of the largest CPU ID.  On systems with
   10 CPUs the labels for the first 10 CPUs were not lined up properly
  otherwise.
  
  Approved by:  re (kib)
  MFC after:1 week

Modified:
  head/contrib/top/display.c

Modified: head/contrib/top/display.c
==
--- head/contrib/top/display.c  Wed Aug 19 14:48:59 2009(r196381)
+++ head/contrib/top/display.c  Wed Aug 19 15:17:13 2009(r196382)
@@ -452,6 +452,7 @@ for (cpu = 0; cpu  num_cpus; cpu++) {
 lastline++;
 
 /* now walk thru the names and print the line */
+Move_to(cpustates_column, y_cpustates + cpu);
 while ((thisname = *names++) != NULL)
 {
if (*thisname != '\0')
@@ -543,6 +544,7 @@ for (cpu = 0; cpu  num_cpus; cpu++) {
printf(\nCPU %d: , cpu);
 lastline++;
 
+Move_to(cpustates_column, y_cpustates + cpu);
 while ((thisname = *names++) != NULL)
 {
if (*thisname != '\0')
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r196380 - head/sys/dev/usb

2009-08-19 Thread Sam Leffler

Rafal Jaworowski wrote:

Author: raj
Date: Wed Aug 19 14:39:08 2009
New Revision: 196380
URL: http://svn.freebsd.org/changeset/base/196380

Log:
  Fix USB cache sync operations for platforms with non-coherent DMA.
  
  - usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,

so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
the low level bus dma sync operation is implementation dependent and we
cannot assume the required order of operations to be guaranteed.
  
  - usb_pc_cpu_flush() is called before writing to a device, so

BUS_DMASYNC_PREWRITE should be used.
  
  Submitted by:	Grzegorz Bernacki

  Reviewed by:  HPS, arm@, usb@ ML
  Tested by:HPS, Mike Tancsa
  Approved by:  re (kib)
  Obtained from:Semihalf


Is this different from the patch I tested on Gateworks 2358 boards which 
didn't completely resolve problems?


Sam
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r196380 - head/sys/dev/usb

2009-08-19 Thread Sam Leffler

Rafal Jaworowski wrote:


On 2009-08-19, at 17:30, Sam Leffler wrote:


Rafal Jaworowski wrote:

Author: raj
Date: Wed Aug 19 14:39:08 2009
New Revision: 196380
URL: http://svn.freebsd.org/changeset/base/196380
Log:
 Fix USB cache sync operations for platforms with non-coherent DMA.
   - usb_pc_cpu_invalidate() is called between [consecutive] reads 
from a device,
   so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. 
Note we
   cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC 
flags, as
   the low level bus dma sync operation is implementation dependent 
and we

   cannot assume the required order of operations to be guaranteed.
   - usb_pc_cpu_flush() is called before writing to a device, so
   BUS_DMASYNC_PREWRITE should be used.
   Submitted by:Grzegorz Bernacki
 Reviewed by:HPS, arm@, usb@ ML
 Tested by:HPS, Mike Tancsa
 Approved by:re (kib)
 Obtained from:Semihalf


Is this different from the patch I tested on Gateworks 2358 boards 
which didn't completely resolve problems?


Hm, not sure what patch you have tested with GW. There was an initial 
workaround for this problem from late June time frame, and this commit 
is a refined fix identical to the patch posted 05 Aug to a...@. There 
were other ARM patches in the meantime involving cache sync, but they 
were pmap-related.


I'm pretty sure it's the same one and was combined with other changes 
you describe.  Unfortunately reproducing the problem requires an 
out-of-tree driver so we can't be sure whether all issues are resolved 
on the platform.


Sam
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196383 - head/sbin/bsdlabel

2009-08-19 Thread Marcel Moolenaar
Author: marcel
Date: Wed Aug 19 16:29:20 2009
New Revision: 196383
URL: http://svn.freebsd.org/changeset/base/196383

Log:
  Remove the dependency on the kernel -- in particular the gctl request to
  the GEOM_BSD class -- to translate the absolute offsets in the label to
  relative ones. This makes bslabel(8) work correctly with GEOM_PART and
  also when the BSD label is nested under arbitrary partitioning schemes.
  
  Inspired by:  Eygene Ryabinkin rea-f...@codelabs.ru
  Approved by:  re (kib)

Modified:
  head/sbin/bsdlabel/bsdlabel.c

Modified: head/sbin/bsdlabel/bsdlabel.c
==
--- head/sbin/bsdlabel/bsdlabel.c   Wed Aug 19 15:17:13 2009
(r196382)
+++ head/sbin/bsdlabel/bsdlabel.c   Wed Aug 19 16:29:20 2009
(r196383)
@@ -118,7 +118,7 @@ static int  installboot;/* non-zero if w
 static int allfields;  /* present all fields in edit */
 static char const *xxboot; /* primary boot */
 
-static off_t mbroffset;
+static uint32_t lba_offset;
 #ifndef LABELSECTOR
 #define LABELSECTOR -1
 #endif
@@ -403,7 +403,7 @@ writelabel(void)
readboot();
for (i = 0; i  lab.d_npartitions; i++)
if (lab.d_partitions[i].p_size)
-   lab.d_partitions[i].p_offset += mbroffset;
+   lab.d_partitions[i].p_offset += lba_offset;
bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize,
lp);
if (alphacksum) {
@@ -479,10 +479,9 @@ get_file_parms(int f)
 static int
 readlabel(int flag)
 {
+   uint32_t lba;
int f, i;
int error;
-   struct gctl_req *grq;
-   char const *errstr;
 
f = open(specname, O_RDONLY);
if (f  0)
@@ -510,22 +509,28 @@ readlabel(int flag)
 
if (is_file)
return(0);
-   grq = gctl_get_handle();
-   gctl_ro_param(grq, verb, -1, read mbroffset);
-   gctl_ro_param(grq, class, -1, BSD);
-   gctl_ro_param(grq, geom, -1, pname);
-   gctl_rw_param(grq, mbroffset, sizeof(mbroffset), mbroffset);
-   errstr = gctl_issue(grq);
-   if (errstr != NULL) {
-   mbroffset = 0;
-   gctl_free(grq);
-   return (error);
+
+   /*
+* Compensate for absolute block addressing by finding the
+* smallest partition offset and if the offset of the 'c'
+* partition is equal to that, subtract it from all offsets.
+*/
+   lba = ~0;
+   for (i = 0; i  lab.d_npartitions; i++) {
+   if (lab.d_partitions[i].p_size)
+   lba = MIN(lba, lab.d_partitions[i].p_offset);
}
-   mbroffset /= lab.d_secsize;
-   if (lab.d_partitions[RAW_PART].p_offset == mbroffset)
-   for (i = 0; i  lab.d_npartitions; i++)
+   if (lba != 0  lab.d_partitions[RAW_PART].p_offset == lba) {
+   for (i = 0; i  lab.d_npartitions; i++) {
if (lab.d_partitions[i].p_size)
-   lab.d_partitions[i].p_offset -= mbroffset;
+   lab.d_partitions[i].p_offset -= lba;
+   }
+   /*
+* Save the offset so that we can write the label
+* back with absolute block addresses.
+*/
+   lba_offset = lba;
+   }
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196384 - stable/8/sbin/bsdlabel

2009-08-19 Thread Marcel Moolenaar
Author: marcel
Date: Wed Aug 19 16:40:45 2009
New Revision: 196384
URL: http://svn.freebsd.org/changeset/base/196384

Log:
  MFC change 196383:
   Remove the dependency on the kernel -- in particular the gctl request to
   the GEOM_BSD class -- to translate the absolute offsets in the label to
   relative ones. This makes bslabel(8) work correctly with GEOM_PART and
   also when the BSD label is nested under arbitrary partitioning schemes.
  
  Inspired by:  Eygene Ryabinkin rea-f...@codelabs.ru
  Approved by:  re (kib)

Modified:
  stable/8/sbin/bsdlabel/   (props changed)
  stable/8/sbin/bsdlabel/bsdlabel.c

Modified: stable/8/sbin/bsdlabel/bsdlabel.c
==
--- stable/8/sbin/bsdlabel/bsdlabel.c   Wed Aug 19 16:29:20 2009
(r196383)
+++ stable/8/sbin/bsdlabel/bsdlabel.c   Wed Aug 19 16:40:45 2009
(r196384)
@@ -118,7 +118,7 @@ static int  installboot;/* non-zero if w
 static int allfields;  /* present all fields in edit */
 static char const *xxboot; /* primary boot */
 
-static off_t mbroffset;
+static uint32_t lba_offset;
 #ifndef LABELSECTOR
 #define LABELSECTOR -1
 #endif
@@ -403,7 +403,7 @@ writelabel(void)
readboot();
for (i = 0; i  lab.d_npartitions; i++)
if (lab.d_partitions[i].p_size)
-   lab.d_partitions[i].p_offset += mbroffset;
+   lab.d_partitions[i].p_offset += lba_offset;
bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize,
lp);
if (alphacksum) {
@@ -479,10 +479,9 @@ get_file_parms(int f)
 static int
 readlabel(int flag)
 {
+   uint32_t lba;
int f, i;
int error;
-   struct gctl_req *grq;
-   char const *errstr;
 
f = open(specname, O_RDONLY);
if (f  0)
@@ -510,22 +509,28 @@ readlabel(int flag)
 
if (is_file)
return(0);
-   grq = gctl_get_handle();
-   gctl_ro_param(grq, verb, -1, read mbroffset);
-   gctl_ro_param(grq, class, -1, BSD);
-   gctl_ro_param(grq, geom, -1, pname);
-   gctl_rw_param(grq, mbroffset, sizeof(mbroffset), mbroffset);
-   errstr = gctl_issue(grq);
-   if (errstr != NULL) {
-   mbroffset = 0;
-   gctl_free(grq);
-   return (error);
+
+   /*
+* Compensate for absolute block addressing by finding the
+* smallest partition offset and if the offset of the 'c'
+* partition is equal to that, subtract it from all offsets.
+*/
+   lba = ~0;
+   for (i = 0; i  lab.d_npartitions; i++) {
+   if (lab.d_partitions[i].p_size)
+   lba = MIN(lba, lab.d_partitions[i].p_offset);
}
-   mbroffset /= lab.d_secsize;
-   if (lab.d_partitions[RAW_PART].p_offset == mbroffset)
-   for (i = 0; i  lab.d_npartitions; i++)
+   if (lba != 0  lab.d_partitions[RAW_PART].p_offset == lba) {
+   for (i = 0; i  lab.d_npartitions; i++) {
if (lab.d_partitions[i].p_size)
-   lab.d_partitions[i].p_offset -= mbroffset;
+   lab.d_partitions[i].p_offset -= lba;
+   }
+   /*
+* Save the offset so that we can write the label
+* back with absolute block addresses.
+*/
+   lba_offset = lba;
+   }
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196385 - stable/8/contrib/top

2009-08-19 Thread John Baldwin
Author: jhb
Date: Wed Aug 19 17:45:58 2009
New Revision: 196385
URL: http://svn.freebsd.org/changeset/base/196385

Log:
  MFC 196382:
  Explicitly line up the CPU state labels with the calculated starting column
  that takes into account the width of the largest CPU ID.  On systems with
   10 CPUs the labels for the first 10 CPUs were not lined up properly
  otherwise.
  
  Approved by:  re (kib)

Modified:
  stable/8/contrib/top/   (props changed)
  stable/8/contrib/top/display.c
  stable/8/contrib/top/install-sh   (props changed)

Modified: stable/8/contrib/top/display.c
==
--- stable/8/contrib/top/display.c  Wed Aug 19 16:40:45 2009
(r196384)
+++ stable/8/contrib/top/display.c  Wed Aug 19 17:45:58 2009
(r196385)
@@ -452,6 +452,7 @@ for (cpu = 0; cpu  num_cpus; cpu++) {
 lastline++;
 
 /* now walk thru the names and print the line */
+Move_to(cpustates_column, y_cpustates + cpu);
 while ((thisname = *names++) != NULL)
 {
if (*thisname != '\0')
@@ -543,6 +544,7 @@ for (cpu = 0; cpu  num_cpus; cpu++) {
printf(\nCPU %d: , cpu);
 lastline++;
 
+Move_to(cpustates_column, y_cpustates + cpu);
 while ((thisname = *names++) != NULL)
 {
if (*thisname != '\0')
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196386 - head/sys/dev/e1000

2009-08-19 Thread Xin LI
Author: delphij
Date: Wed Aug 19 17:59:41 2009
New Revision: 196386
URL: http://svn.freebsd.org/changeset/base/196386

Log:
  Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
  Without this changeset there will be no way to prevent these NICs from
  sending ARP, which is harmful in server farms that is configured as
  Direct Server Return behind a load balancer.
  
  A better fix would remove the whole hack completely but it would be
  later than 8.0-RELEASE.
  
  Reviewed by:  jfv, yongari
  Approved by:  re (kib)

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_em.c
==
--- head/sys/dev/e1000/if_em.c  Wed Aug 19 17:45:58 2009(r196385)
+++ head/sys/dev/e1000/if_em.c  Wed Aug 19 17:59:41 2009(r196386)
@@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long comma
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
-   arp_ifinit(ifp, ifa);
+   if (!(ifp-if_flags  IFF_NOARP))
+   arp_ifinit(ifp, ifa);
} else
 #endif
error = ether_ioctl(ifp, command, data);

Modified: head/sys/dev/e1000/if_igb.c
==
--- head/sys/dev/e1000/if_igb.c Wed Aug 19 17:45:58 2009(r196385)
+++ head/sys/dev/e1000/if_igb.c Wed Aug 19 17:59:41 2009(r196386)
@@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm
igb_init_locked(adapter);
IGB_CORE_UNLOCK(adapter);
}
-   arp_ifinit(ifp, ifa);
+   if (!(ifp-if_flags  IFF_NOARP))
+   arp_ifinit(ifp, ifa);
} else
 #endif
error = ether_ioctl(ifp, command, data);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196387 - in stable/8/sys: . dev/e1000

2009-08-19 Thread Xin LI
Author: delphij
Date: Wed Aug 19 18:08:50 2009
New Revision: 196387
URL: http://svn.freebsd.org/changeset/base/196387

Log:
  MFC r196386:
  
  Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
  Without this changeset there will be no way to prevent these NICs from
  sending ARP, which is harmful in server farms that is configured as
  Direct Server Return behind a load balancer.
  
  A better fix would remove the whole hack completely but it would be
  later than 8.0-RELEASE.
  
  Reviewed by:  jfv, yongari
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c

Modified: stable/8/sys/dev/e1000/if_em.c
==
--- stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 17:59:41 2009
(r196386)
+++ stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 18:08:50 2009
(r196387)
@@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long comma
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
-   arp_ifinit(ifp, ifa);
+   if (!(ifp-if_flags  IFF_NOARP))
+   arp_ifinit(ifp, ifa);
} else
 #endif
error = ether_ioctl(ifp, command, data);

Modified: stable/8/sys/dev/e1000/if_igb.c
==
--- stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 17:59:41 2009
(r196386)
+++ stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 18:08:50 2009
(r196387)
@@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm
igb_init_locked(adapter);
IGB_CORE_UNLOCK(adapter);
}
-   arp_ifinit(ifp, ifa);
+   if (!(ifp-if_flags  IFF_NOARP))
+   arp_ifinit(ifp, ifa);
} else
 #endif
error = ether_ioctl(ifp, command, data);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r196387 - in stable/8/sys: . dev/e1000

2009-08-19 Thread Jack Vogel
Thanks for doing this for me Xin.

Jack


On Wed, Aug 19, 2009 at 11:08 AM, Xin LI delp...@freebsd.org wrote:

 Author: delphij
 Date: Wed Aug 19 18:08:50 2009
 New Revision: 196387
 URL: http://svn.freebsd.org/changeset/base/196387

 Log:
  MFC r196386:

  Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
  Without this changeset there will be no way to prevent these NICs from
  sending ARP, which is harmful in server farms that is configured as
  Direct Server Return behind a load balancer.

  A better fix would remove the whole hack completely but it would be
  later than 8.0-RELEASE.

  Reviewed by:  jfv, yongari
  Approved by:  re (kib)

 Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c

 Modified: stable/8/sys/dev/e1000/if_em.c

 ==
 --- stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 17:59:41 2009
  (r196386)
 +++ stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 18:08:50 2009
  (r196387)
 @@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long comma
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
 -   arp_ifinit(ifp, ifa);
 +   if (!(ifp-if_flags  IFF_NOARP))
 +   arp_ifinit(ifp, ifa);
} else
  #endif
error = ether_ioctl(ifp, command, data);

 Modified: stable/8/sys/dev/e1000/if_igb.c

 ==
 --- stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 17:59:41 2009
  (r196386)
 +++ stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 18:08:50 2009
  (r196387)
 @@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm
igb_init_locked(adapter);
IGB_CORE_UNLOCK(adapter);
}
 -   arp_ifinit(ifp, ifa);
 +   if (!(ifp-if_flags  IFF_NOARP))
 +   arp_ifinit(ifp, ifa);
} else
  #endif
error = ether_ioctl(ifp, command, data);

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196390 - in head/sys: amd64/amd64 i386/i386

2009-08-19 Thread Ed Schouten
Author: ed
Date: Wed Aug 19 20:39:33 2009
New Revision: 196390
URL: http://svn.freebsd.org/changeset/base/196390

Log:
  Make the MacBookPro3,1 hardware boot again.
  
  Tested by:Patrick Lamaiziere patfbsd davenulle org
  Approved by:  re (kib)

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Wed Aug 19 20:17:36 2009
(r196389)
+++ head/sys/amd64/amd64/machdep.c  Wed Aug 19 20:39:33 2009
(r196390)
@@ -217,6 +217,7 @@ cpu_startup(dummy)
strncmp(sysenv, MacBook3,1, 10) == 0 ||
strncmp(sysenv, MacBookPro1,1, 13) == 0 ||
strncmp(sysenv, MacBookPro1,2, 13) == 0 ||
+   strncmp(sysenv, MacBookPro3,1, 13) == 0 ||
strncmp(sysenv, Macmini1,1, 10) == 0) {
if (bootverbose)
printf(Disabling LEGACY_USB_EN bit on 

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cWed Aug 19 20:17:36 2009
(r196389)
+++ head/sys/i386/i386/machdep.cWed Aug 19 20:39:33 2009
(r196390)
@@ -261,6 +261,7 @@ cpu_startup(dummy)
strncmp(sysenv, MacBook3,1, 10) == 0 ||
strncmp(sysenv, MacBookPro1,1, 13) == 0 ||
strncmp(sysenv, MacBookPro1,2, 13) == 0 ||
+   strncmp(sysenv, MacBookPro3,1, 13) == 0 ||
strncmp(sysenv, Macmini1,1, 10) == 0) {
if (bootverbose)
printf(Disabling LEGACY_USB_EN bit on 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196393 - in stable/8: etc share/man/man5 usr.sbin/freebsd-update

2009-08-19 Thread Simon L. Nielsen
Author: simon
Date: Wed Aug 19 21:01:32 2009
New Revision: 196393
URL: http://svn.freebsd.org/changeset/base/196393

Log:
  MFC 196392:
  
Add support for backing up the old kernel when installing a new kernel
using freebsd-update.  This applies to using freebsd-update in upgrade
mode and normal freebsd-update on a security branch.
  
The backup kernel will be written to /boot/kernel.old, if the directory
does not exist, or the directory was created by freebsd-update in a
previous backup.  Otherwise freebsd-update will generate a new directory
name for use by the backup.  By default symbol files are not backed up
to save diskspace and avoid filling up the root partition.
  
This feature is fully configurable in the freebsd-update config file,
but defaults to enabled.
  
Reviewed by:cperciva
  
  Approved by:  re (kib)

Modified:
  stable/8/etc/   (props changed)
  stable/8/etc/freebsd-update.conf
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man5/freebsd-update.conf.5
  stable/8/usr.sbin/freebsd-update/   (props changed)
  stable/8/usr.sbin/freebsd-update/freebsd-update.sh

Modified: stable/8/etc/freebsd-update.conf
==
--- stable/8/etc/freebsd-update.confWed Aug 19 20:47:31 2009
(r196392)
+++ stable/8/etc/freebsd-update.confWed Aug 19 21:01:32 2009
(r196393)
@@ -63,3 +63,14 @@ MergeChanges /etc/ /var/named/etc/ /boot
 # which *might* be installed of which FreeBSD Update should figure out
 # which actually are installed and upgrade those (StrictComponents no)?
 # StrictComponents no
+
+# When installing a new kernel perform a backup of the old one first
+# so it is possible to boot the old kernel in case of problems.
+# BackupKernel yes
+
+# If BackupKernel is enabled, the backup kernel is saved to this
+# directory.
+# BackupKernelDir /boot/kernel.old
+
+# When backing up a kernel also back up debug symbol files?
+# BackupKernelSymbolFiles no

Modified: stable/8/share/man/man5/freebsd-update.conf.5
==
--- stable/8/share/man/man5/freebsd-update.conf.5   Wed Aug 19 20:47:31 
2009(r196392)
+++ stable/8/share/man/man5/freebsd-update.conf.5   Wed Aug 19 21:01:32 
2009(r196393)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd August 30, 2006
+.Dd August 19, 2009
 .Dt FREEBSD-UPDATE.CONF 5
 .Os FreeBSD
 .Sh NAME
@@ -48,7 +48,7 @@ error.
 .Pp
 The possible options and their meanings are as follows:
 .Pp
-.Bl -tag -width KeepModifiedMetadata
+.Bl -tag -width .Cm BackupKernelSymbolFiles
 .It Cm KeyPrint
 The single parameter following this keyword is the SHA256 hash
 of the RSA key which will be trusted to sign updates.
@@ -171,6 +171,54 @@ command is used (yes), or merely as a 
 which might be installed, of which
 .Cm freebsd-update
 should identify which in fact are present (no).
+.It Cm BackupKernel
+The single parameter following this keyword must be
+.Dq yes
+or
+.Dq no
+and specifies whether
+.Cm freebsd-update
+will create a backup of the old kernel before installing a new kernel.
+This backup kernel can be used to recover a system where the newly
+installed kernel somehow did not work.
+Note that the backup kernel is not reverted to its original state by
+the
+.Cm freebsd-update
+rollback command.
+.It Cm BackupKernelDir
+This keyword sets the directory which is used to store a backup
+kernel, if the BackupKernel feature is enabled.
+If the directory already exist, and it was not created by
+.Cm freebsd-update ,
+the directory is skipped.
+In the case of the primary directory name not being usable, a number
+starting with
+.Sq 1
+is appended to the directory name.
+Like with the primary directory name, the constructed directory name is
+only used if the path name does not exist, or if the directory was
+previously created by
+.Cm freebsd-update .
+If the constructed directory still exist the appended number is
+incremented with 1 and the directory search process restarted.
+Should the number increment go above 9,
+.Cm freebsd-update
+will abort.
+.It Cm BackupKernelSymbolFiles
+The single parameter following this keyword must be
+.Dq yes
+or
+.Dq no
+and specifies whether
+.Cm freebsd-update
+will also backup kernel symbol files, if they exist.
+The kernel symbol files takes up a lot of disk space and are not
+needed for recovery purposes.
+If the symbol files are needed, after recovering a system using the
+backup kernel, the
+.Cm freebsd-update
+rollback command will recreate the symbol files along with the old
+kernel.
 .El
 .Sh FILES
 .Bl -tag -width /etc/freebsd-update.conf

Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/8/usr.sbin/freebsd-update/freebsd-update.sh  Wed Aug 19 20:47:31 
2009(r196392)
+++ 

svn commit: r196396 - in stable/8/sys: . amd64/include/xen cddl/compat/opensolaris/rpc cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-08-19 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Aug 20 00:08:58 2009
New Revision: 196396
URL: http://svn.freebsd.org/changeset/base/196396

Log:
  MFC r196395:
  
  Our libc doesn't implement control method for XDR (only kernel does) and it
  will always return failure. Fix this by bringing userland implementation of
  xdrmem_control() back. This allow 'zpool import' to work again.
  
  Reported by:  Thomas Backman seren...@exscape.org
  Reviewed by:  kmacy
  Approved by:  re (kib)

Added:
  stable/8/sys/cddl/compat/opensolaris/rpc/xdr.h
 - copied unchanged from r196395, head/sys/cddl/compat/opensolaris/rpc/xdr.h
Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Copied: stable/8/sys/cddl/compat/opensolaris/rpc/xdr.h (from r196395, 
head/sys/cddl/compat/opensolaris/rpc/xdr.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/8/sys/cddl/compat/opensolaris/rpc/xdr.h  Thu Aug 20 00:08:58 
2009(r196396, copy of r196395, 
head/sys/cddl/compat/opensolaris/rpc/xdr.h)
@@ -0,0 +1,70 @@
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+
+#ifndef_OPENSOLARIS_RPC_XDR_H_
+#define_OPENSOLARIS_RPC_XDR_H_
+
+#include_next rpc/xdr.h
+
+#ifndef _KERNEL
+
+#include assert.h
+
+/*
+ * Taken from sys/xdr/xdr_mem.c.
+ *
+ * FreeBSD's userland XDR doesn't implement control method (only the kernel),
+ * but OpenSolaris nvpair still depend on it, so we have to implement it here.
+ */
+static __inline bool_t
+xdrmem_control(XDR *xdrs, int request, void *info)
+{
+   xdr_bytesrec *xptr;
+
+   switch (request) {
+   case XDR_GET_BYTES_AVAIL:
+   xptr = (xdr_bytesrec *)info;
+   xptr-xc_is_last_record = TRUE;
+   xptr-xc_num_avail = xdrs-x_handy;
+   return (TRUE);
+   default:
+   assert(!unexpected request);
+   }
+   return (FALSE);
+}
+
+#undef XDR_CONTROL
+#defineXDR_CONTROL(xdrs, req, op)  
\
+   (((xdrs)-x_ops-x_control == NULL) ?   \
+   xdrmem_control((xdrs), (req), (op)) :   \
+   (*(xdrs)-x_ops-x_control)(xdrs, req, op))   
+
+#endif /* !_KERNEL */
+
+#endif /* !_OPENSOLARIS_RPC_XDR_H_ */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r196398 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet

2009-08-19 Thread Will Andrews
Author: will
Date: Thu Aug 20 02:49:43 2009
New Revision: 196398
URL: http://svn.freebsd.org/changeset/base/196398

Log:
  MFC r196397 from head:
  
Fix CARP memory leaks on carp_if's malloc'd using M_CARP.  This occurs when
CARP tries to free them using M_IFADDR after the last address for a virtual
host is removed and when detaching from the parent interface.
  
  Approved by:  re (kib), ken (mentor)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/ip_carp.c

Modified: stable/8/sys/netinet/ip_carp.c
==
--- stable/8/sys/netinet/ip_carp.c  Thu Aug 20 02:33:12 2009
(r196397)
+++ stable/8/sys/netinet/ip_carp.c  Thu Aug 20 02:49:43 2009
(r196398)
@@ -501,7 +501,7 @@ carpdetach(struct carp_softc *sc, int un
ifpromisc(sc-sc_carpdev, 0);
sc-sc_carpdev-if_carp = NULL;
CARP_LOCK_DESTROY(cif);
-   free(cif, M_IFADDR);
+   free(cif, M_CARP);
} else if (unlock)
CARP_UNLOCK(cif);
sc-sc_carpdev = NULL;
@@ -1639,7 +1639,7 @@ carp_del_addr(struct carp_softc *sc, str
if (!--cif-vhif_nvrs) {
sc-sc_carpdev-if_carp = NULL;
CARP_LOCK_DESTROY(cif);
-   free(cif, M_IFADDR);
+   free(cif, M_CARP);
} else {
CARP_UNLOCK(cif);
}
@@ -1843,7 +1843,7 @@ carp_del_addr6(struct carp_softc *sc, st
if (!--cif-vhif_nvrs) {
CARP_LOCK_DESTROY(cif);
sc-sc_carpdev-if_carp = NULL;
-   free(cif, M_IFADDR);
+   free(cif, M_CARP);
} else
CARP_UNLOCK(cif);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org