Compare commits

...
28 Commits
Author SHA1 Message Date
Ken Smith 9adee7d03f Ready for 8.1-RELEASE builds.
Approved by:	re (implicit)
2010-07-17 04:36:40 +00:00
Ken Smith b45fc34387 Predict the date we'll be ready to announce 8.1-RELEASE. While here
add the entry for 8.0-RELEASE which was added to releng/8.0/UPDATING
during the 8.0-RELEASE cycle but not to stable/8/UPDATING at that time.

Approved by:	re (implicit)
2010-07-17 04:35:51 +00:00
Hiroki Sato 49869ef0b6 Clean-up old contents and bump version numbers for 8.1R.
Approved by:	re (implicitly)
2010-07-17 00:12:41 +00:00
Colin Percival d5406806ab Correctly copy the M_RDONLY flag when duplicating a reference
to an mbuf external buffer.

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-10:07.mbuf
2010-07-13 02:45:17 +00:00
Marius Strobl 62e702af84 MFC: r209695
- Pin the IPI cache and TLB demap functions in order to prevent migration
  between determining the other CPUs and calling cpu_ipi_selected(), which
  apart from generally doing the wrong thing can lead to a panic when a
  CPU is told to IPI itself (which sun4u doesn't support).
  Reported and tested by: Nathaniel W Filardo
- Add __unused where appropriate.

Approved by:	re (kib)
2010-07-07 21:00:17 +00:00
Bjoern A. Zeeb a602ad9076 MFC r207303 (originally by kmacy):
need to initialize the lock before it is used

  Reported on:  stable@ (MFC missing)

Approved by:	re (kensmith)
2010-07-07 17:52:13 +00:00
Ken Smith f60b3c828b Merge r209770 from stable/8:
> Package set for 8.1-RELEASE.  We still have a 2Gb maximum file size
> limit caused by cvsup still being used for some of our mirror system.
> That is being worked on.

Reviewed by:	re@, portmgr@
Approved by:	re (implicit)
2010-07-07 17:20:16 +00:00
Michael Tuexen 2f9f22aec1 MFC r209624
* Do not dereference a NULL pointer when calling an SCTP send syscall
   not providing a destination address and using ktrace.
 * Do not copy out kernel memory when providing sinfo for sctp_recvmsg().
 Both bugs where reported by Valentin Nechayev.
 The first bug results in a kernel panic.
Approved by: re@
2010-07-05 18:45:59 +00:00
Rui Paulo 6543f92a8c MFC r209541, r209548:
Fix the AR_SREV_MERLIN_20_OR_LATER() check.

Approved by:	re (kensmith)
2010-06-28 14:15:54 +00:00
Ken Smith 7cc3e11f8c Ready to proceed with 8.1-RC2.
Approved by:	re (implicit)
2010-06-26 14:55:53 +00:00
Qing Li dd62f5c0e6 MFC r208553
This patch fixes the problem where proxy ARP entries cannot be added
over the if_ng interface.

Approved by:	re (bz)
2010-06-25 21:26:34 +00:00
Pawel Jakub Dawidek c9697b738c MFC r209263:
r209175:

Eliminate dead code.

Found by:	Coverity Prevent
CID:		5158

r209177:

Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by:	Coverity Prevent
CID:		5243

r209179:

Plug memory leaks.

Found by:	Coverity Prevent
CID:		7052, 7053, 7054, 7055

r209180:

Plug memory leak.

Found by:	Coverity Prevent
CID:		7051

r209181:

Plug memory leak.

Found by:	Coverity Prevent
CID:		7056

r209182:

Plug memory leak.

Found by:	Coverity Prevent
CID:		7057

r209183:

Initialize gctl_seq for synchronization requests.

Reported by:	[email protected]
Analysed by:	Mikolaj Golub <[email protected]>
Tested by:	[email protected], Mikolaj Golub <[email protected]>

r209184:

Fix typos.

r209185:

Correct various log messages.

Submitted by: Mikolaj Golub <[email protected]>

Note that without some of these changes hastd won't work on 8.x properly.

Approved by:	re (kensmith)
2010-06-23 23:07:57 +00:00
Pawel Jakub Dawidek 4e3eb21c22 MFC r209262:
r209186:

BIO_DELETE contains range we want to delete and doesn't provide any
useful data, so there is no need to copy it to userland.

r209187:

'unit' can be negative, so use signed type for it.

Found by:	Coverity Prevent
CID:		3731

Approved by:	re (kensmith)
2010-06-23 23:03:25 +00:00
John Baldwin b6bfb5a01f MFC 209213:
When updating individual CPU's lowest Cx state to use, never set it to a
state lower than the lowest one supported by the current CPU.  This closes
some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx
states for individual CPUs were changing (e.g. unplugging the AC adapter
of a laptop) that could result in panics.

Approved by:	re (kib)
2010-06-23 17:51:11 +00:00
Nathan Whitehorn 3aaef367db MFC r209369:
Temporarily disable instruction relocation while setting up the kernel's
IBAT entry in early boot in order to prevent possible faults from races
between the instruction cache and the MMU.

PR:		powerpc/148003
Approved by:	re (kib)
2010-06-23 13:47:27 +00:00
Alexander Motin eeca979076 MFC r209341:
Report transport type in XPT_PATH_INQ.

Approved by:	re (kib)
2010-06-23 10:06:31 +00:00
Alexander Motin c9db4f3ae5 MFC r209340:
Report transport type in XPT_PATH_INQ.

PR:		i386/147929
Approved by:	re (kib)
2010-06-23 10:04:48 +00:00
Doug Barton f9b8cd3062 MFC 209286:
Add the AAAA address for i.root-servers.net

Approved by:	re (kensmith)
2010-06-23 03:56:53 +00:00
Dag-Erling Smørgrav 838357d317 merge r196650 from head (via stable/8): tty might be NULL
Approved by:	re (kib@)
2010-06-22 19:56:07 +00:00
Michael Tuexen 5483bc18e4 MFC 209264
* Fix a bug where the length of the ASCONF-ACK was calculated wrong due
   to using an uninitialized variable.
 * Fix a bug where a NULL pointer was dereferenced when interfaces
   come and go at a high rate.
 * Fix a bug where inps where not deregistered from iterators.
 * Fix a race condition in freeing an association.
 * Fix a refcount problem related to the iterator.
 Each of the above bug results in a panic. It shows up when
 interfaces come and go at a high rate.

Approved by: re
2010-06-22 17:45:21 +00:00
Marcel Moolenaar 2697585631 MFC revs 209026 and 209085:
o   Bump MAX_BPAGES from 256 to 1024.
o   Synchronize the kernel entry on all CPUs with the use of the ptc.g
    instruction on a single CPU by implementing a bare-bones readers-
    writer lock.

Approved by:	re (kensmith)
2010-06-19 05:35:47 +00:00
Pawel Jakub Dawidek 52e50b42b8 MFC r209265:
r209260:

Backout r207970 for now, it can lead to deadlocks.

Reported by:	kan

r209261:

Turn off UMA allocations on all archs by default. It isn't stable even
on amd64.

Reported by:	many

Approved by:	re (kib)
2010-06-18 22:06:49 +00:00
Randi Harper 50a0a767af MFC r209273:
Fix uninitialized variables that cause a crash when the network is
  initialized and sysinstall is not running as init.

Submitted by:	Nick Mills
Approved by:	cperciva (mentor)
Approved by:	re (kensmith)
2010-06-18 21:10:56 +00:00
Marius Strobl ca2ca03497 MFC: r209138
Update a branch missed in r207537 (committed to stable/8 in r207890).

Approved by:	re (kib)
2010-06-17 20:53:56 +00:00
Ken Smith d77e9f9af0 Ready for 8.1-RC1.
Approved by:	re (implicit)
2010-06-14 02:31:53 +00:00
Ken Smith b62eb0e439 Adjust __FreeBSD_version to reflect this is the 8.1 release branch.
Approved by:	re (implicit)
2010-06-14 02:30:59 +00:00
Ken Smith c2bceff500 Adjust cvs branch tag.
Approved by:	re (implicit)
2010-06-14 02:29:25 +00:00
Ken Smith 88385abb0a Adjust the cvs branch for 'make update'.
Approved by:	re (implicit)
2010-06-14 02:26:33 +00:00
50 changed files with 270 additions and 2597 deletions

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ CLEANDIR= cleandir
.endif
CVS?= cvs
CVSFLAGS?= -r RELENG_8 -P -d -I!
CVSFLAGS?= -r RELENG_8_1 -P -d -I!
SVN?= svn
SVNFLAGS?= -r HEAD
SUP?= /usr/bin/csup
+10
View File
@@ -15,6 +15,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
20100720:
8.1-RELEASE.
20100713: FreeBSD-SA-10:07.mbuf
Correctly copy the M_RDONLY flag when duplicating a reference
to an mbuf external buffer.
20100502:
The config(8) command has been updated to maintain compatibility
with config files from 8.0-RELEASE. You will need a new version
@@ -56,6 +63,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
via the DEADLKRES option, see NOTES for more details) and the
sleepq_type() function for sleepqueues.
20091125:
8.0-RELEASE.
20090929:
802.11s D3.03 support was committed. This is incompatible with
the previous code, which was based on D3.0.
+3 -2
View File
@@ -13,8 +13,8 @@
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: Dec 12, 2008
; related version of root zone: 2008121200
; last update: Jun 17, 2010
; related version of root zone: 2010061700
;
; formerly NS.INTERNIC.NET
;
@@ -63,6 +63,7 @@ H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53
;
; OPERATED BY VERISIGN, INC.
;
@@ -183,6 +183,11 @@ pam_sm_close_session(pam_handle_t *pamh __unused, int flags __unused,
pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty);
if (pam_err != PAM_SUCCESS)
goto err;
if (tty == NULL) {
PAM_LOG("No PAM_TTY");
pam_err = PAM_SERVICE_ERR;
goto err;
}
if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0)
tty = (const char *)tty + strlen(_PATH_DEV);
if (*(const char *)tty == '\0')
@@ -16,7 +16,7 @@
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY release.bugfix "8.0-RELEASE">
<!ENTITY release.bugfix "8.1-RELEASE">
]>
<article>
@@ -40,7 +40,7 @@
<pubdate>$FreeBSD$</pubdate>
<copyright>
<year>2009</year>
<year>2010</year>
<holder role="mailto:[email protected]">The &os; Documentation Project</holder>
</copyright>
@@ -129,6 +129,7 @@
For more information, consult the individual advisories available from
<ulink url="http://security.FreeBSD.org/"></ulink>.</para>
<!--
<informaltable frame="none" pgwide="0">
<tgroup cols="3">
<colspec colwidth="1*">
@@ -143,18 +144,6 @@
</thead>
<tbody>
<row>
<entry><ulink url="http://security.freebsd.org/advisories/FreeBSD-SA-09:17.freebsd-update.asc"
>SA-09:17.freebsd-update</ulink></entry>
<entry>03&nbsp;December&nbsp;2009</entry>
<entry><para>Inappropriate directory permissions in freebsd-update(8)</para></entry>
</row>
<row>
<entry><ulink url="http://security.freebsd.org/advisories/FreeBSD-SA-09:16.rtld.asc"
>SA-09:16.rtld</ulink></entry>
<entry>03&nbsp;December&nbsp;2009</entry>
<entry><para>Improper environment sanitization in rtld(1)</para></entry>
</row>
<row>
<entry><ulink url="http://security.freebsd.org/advisories/FreeBSD-SA-09:15.ssl.asc"
>SA-09:15.ssl</ulink></entry>
@@ -164,6 +153,7 @@
</tbody>
</tgroup>
</informaltable>
-->
</sect1>
@@ -30,6 +30,7 @@
<year>2007</year>
<year>2008</year>
<year>2009</year>
<year>2010</year>
<holder role="mailto:[email protected]">The &os; Documentation Project</holder>
</copyright>
@@ -24,6 +24,8 @@
<year>2006</year>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<year>2010</year>
<holder role="mailto:[email protected]">The &os; Documentation Project</holder>
</copyright>
File diff suppressed because it is too large. Load diff
+4 -44
View File
@@ -121,14 +121,7 @@
((or (equal? arch #f)
(equal? arch "")
(equal? arch "all"))
(make sequence
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R]")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R]")
(empty-sosofo))
(process-children-trim))
(process-children-trim))
(else
(make sequence
(literal "[")
@@ -142,12 +135,6 @@
(loop (car rest) (cdr rest)))
(empty-sosofo))))
(literal "] ")
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R] ")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R] ")
(empty-sosofo))
(process-children-trim))))
(if (and (not (null? role)) (equal? role "merged"))
(literal " [" merged-string "]")
@@ -171,14 +158,7 @@
((or (equal? arch #f)
(equal? arch "")
(equal? arch "all"))
(make sequence
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R] ")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R] ")
(empty-sosofo))
(process-children-trim)))
(process-children-trim))
(else
(make sequence
(literal "[")
@@ -192,16 +172,10 @@
(loop (car rest) (cdr rest)))
(empty-sosofo))))
(literal "] ")
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R]")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R]")
(empty-sosofo))
(process-children-trim))))
(if (and (not (null? role)) (equal? role "merged"))
(literal " [" merged-string "]")
(empty-sosofo))))))))
(empty-sosofo)))))))
]]>
<![ %output.html; [
@@ -251,24 +225,10 @@
((or (equal? arch #f)
(equal? arch "")
(equal? arch "all"))
(make sequence
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R] ")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R] ")
(empty-sosofo))
(process-children)))
(process-children))
(else
(sosofo-append
(make sequence
(make sequence
(if (and (not (null? role)) (equal? role "7.1"))
(literal " [7.1R] ")
(empty-sosofo))
(if (and (not (null? role)) (equal? role "7.2"))
(literal " [7.2R] ")
(empty-sosofo)))
(literal "[")
(let loop ((prev (car (split-string-to-list arch)))
(rest (cdr (split-string-to-list arch))))
+12 -9
View File
@@ -6,21 +6,21 @@
<!-- Version of the OS we're describing. This needs to be updated
with each new release. -->
<!ENTITY release.current "8.0-RELEASE">
<!ENTITY release.current "8.1-RELEASE">
<!-- The previous version used for comparison in the "What's New"
section. For -CURRENT, we might point back to the last
branchpoint. -->
<!ENTITY release.prev "7.0-RELEASE">
<!ENTITY release.prev "8.0-RELEASE">
<!-- The next version to be released, usually used for snapshots. -->
<!ENTITY release.next "8.1-RELEASE">
<!ENTITY release.next "8.2-RELEASE">
<!-- The name of this branch. -->
<!ENTITY release.branch "8-STABLE">
<!ENTITY release.branch "8.0-STABLE">
<!-- The URL for obtaining this version of FreeBSD. -->
<!ENTITY release.url "ftp://ftp.FreeBSD.org/">
<!ENTITY release.url "http://www.FreeBSD.org/">
<!-- The type of release (usually this will be either "snapshot"
or "release" -->
@@ -31,10 +31,10 @@
<!-- The manpaths for man page references -->
<!ENTITY release.man.url "http://www.FreeBSD.org/cgi/man.cgi">
<!ENTITY release.manpath.xorg "7.4">
<!ENTITY release.manpath.netbsd "5.0.1">
<!ENTITY release.manpath.xorg "7.5">
<!ENTITY release.manpath.netbsd "5.0.2">
<!ENTITY release.manpath.freebsd-ports "Ports">
<!ENTITY release.manpath.freebsd "8.0-RELEASE">
<!ENTITY release.manpath.freebsd "8.1-RELEASE">
<!-- Text constants which probably don't need to be changed.-->
@@ -48,8 +48,11 @@
<!ENTITY arch.arm "arm">
<!ENTITY arch.i386 "i386">
<!ENTITY arch.ia64 "ia64">
<!ENTITY arch.mips "MIPS">
<!ENTITY arch.mips "mips">
<!ENTITY arch.pc98 "pc98">
<!ENTITY arch.powerpc "powerpc">
<!ENTITY arch.sparc64 "sparc64">
<!ENTITY arch.sun4v "sun4v">
<!-- The marker for MFCs. -->
<!ENTITY merged "MERGED">
+3 -34
View File
@@ -52,52 +52,21 @@ def disc1_packages():
if doing_dvd:
pkgs.extend(['archivers/unzip',
'astro/xearth',
'devel/gmake',
'devel/imake',
'editors/emacs',
'editors/vim-lite',
'emulators/linux_base-f10',
'emulators/mtools',
'graphics/png',
'graphics/xv',
'irc/xchat',
'lang/perl5.8',
'mail/alpine',
'mail/exim',
'mail/fetchmail',
'mail/mutt',
'mail/popd',
'mail/postfix',
'mail/xfmail',
'net/cvsup-without-gui',
'lang/perl5.10',
'net/mpd5',
'net/rsync',
'net/samba3',
'news/slrn',
'news/tin',
'ports-mgmt/p5-FreeBSD-Portindex',
'ports-mgmt/portaudit',
'ports-mgmt/portmaster',
'ports-mgmt/portupgrade',
'print/a2ps-letter',
'print/apsfilter',
'print/ghostscript7-nox11',
'print/psutils-letter',
'print/gv',
'shells/bash',
'shells/pdksh',
'shells/zsh',
'security/sudo',
'sysutils/screen',
'www/links',
'www/lynx',
'x11/gnome2',
'x11/kde4',
'x11/rxvt',
'x11/xorg',
'x11-wm/afterstep',
'x11-wm/fvwm2',
'x11-wm/windowmaker'])
'x11/xorg'])
return pkgs
# The list of desired packages
+7 -7
View File
@@ -55,8 +55,8 @@ struct ebuf {
size_t eb_size;
};
static int ebuf_head_extent(struct ebuf *eb, size_t size);
static int ebuf_tail_extent(struct ebuf *eb, size_t size);
static int ebuf_head_extend(struct ebuf *eb, size_t size);
static int ebuf_tail_extend(struct ebuf *eb, size_t size);
struct ebuf *
ebuf_alloc(size_t size)
@@ -110,7 +110,7 @@ ebuf_add_head(struct ebuf *eb, const void *data, size_t size)
* We can't add more entries at the front, so we have to extend
* our buffer.
*/
if (ebuf_head_extent(eb, size) < 0)
if (ebuf_head_extend(eb, size) < 0)
return (-1);
}
assert(size <= (size_t)(eb->eb_used - eb->eb_start));
@@ -137,13 +137,13 @@ ebuf_add_tail(struct ebuf *eb, const void *data, size_t size)
* We can't add more entries at the back, so we have to extend
* our buffer.
*/
if (ebuf_tail_extent(eb, size) < 0)
if (ebuf_tail_extend(eb, size) < 0)
return (-1);
}
assert(size <= (size_t)(eb->eb_end - (eb->eb_used + eb->eb_size)));
/*
* If data is NULL the caller just wants to reserve place.
* If data is NULL the caller just wants to reserve space.
*/
if (data != NULL)
bcopy(data, eb->eb_used + eb->eb_size, size);
@@ -203,7 +203,7 @@ ebuf_size(struct ebuf *eb)
* Function adds size + (PAGE_SIZE / 4) bytes at the front of the buffer..
*/
static int
ebuf_head_extent(struct ebuf *eb, size_t size)
ebuf_head_extend(struct ebuf *eb, size_t size)
{
unsigned char *newstart, *newused;
size_t newsize;
@@ -231,7 +231,7 @@ ebuf_head_extent(struct ebuf *eb, size_t size)
* Function adds size + ((3 * PAGE_SIZE) / 4) bytes at the back.
*/
static int
ebuf_tail_extent(struct ebuf *eb, size_t size)
ebuf_tail_extend(struct ebuf *eb, size_t size)
{
unsigned char *newstart;
size_t newsize;
+1 -3
View File
@@ -329,9 +329,7 @@ hast_proto_recv_hdr(struct proto_conn *conn, struct nv **nvp)
*nvp = nv;
return (0);
fail:
if (nv != NULL)
nv_free(nv);
else if (eb != NULL)
if (eb != NULL)
ebuf_free(eb);
return (-1);
}
+15 -23
View File
@@ -200,7 +200,7 @@ listen_accept(void)
proto_local_address(conn, laddr, sizeof(laddr));
proto_remote_address(conn, raddr, sizeof(raddr));
pjdlog_info("Connection from %s to %s.", laddr, raddr);
pjdlog_info("Connection from %s to %s.", raddr, laddr);
/* Error in setting timeout is not critical, but why should it fail? */
if (proto_timeout(conn, HAST_TIMEOUT) < 0)
@@ -286,7 +286,7 @@ listen_accept(void)
if (token != NULL && memcmp(token, res->hr_token,
sizeof(res->hr_token)) != 0) {
pjdlog_error("Token received from %s doesn't match.", raddr);
nv_add_stringf(nverr, "errmsg", "Toke doesn't match.");
nv_add_stringf(nverr, "errmsg", "Token doesn't match.");
goto fail;
}
/*
@@ -400,7 +400,11 @@ static void
main_loop(void)
{
fd_set rfds, wfds;
int fd, maxfd, ret;
int cfd, lfd, maxfd, ret;
cfd = proto_descriptor(cfg->hc_controlconn);
lfd = proto_descriptor(cfg->hc_listenconn);
maxfd = cfd > lfd ? cfd : lfd;
for (;;) {
if (sigchld_received) {
@@ -412,22 +416,13 @@ main_loop(void)
hastd_reload();
}
maxfd = 0;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
/* Setup descriptors for select(2). */
#define SETUP_FD(conn) do { \
fd = proto_descriptor(conn); \
if (fd >= 0) { \
maxfd = fd > maxfd ? fd : maxfd; \
FD_SET(fd, &rfds); \
FD_SET(fd, &wfds); \
} \
} while (0)
SETUP_FD(cfg->hc_controlconn);
SETUP_FD(cfg->hc_listenconn);
#undef SETUP_FD
FD_ZERO(&rfds);
FD_SET(cfd, &rfds);
FD_SET(lfd, &rfds);
FD_ZERO(&wfds);
FD_SET(cfd, &wfds);
FD_SET(lfd, &wfds);
ret = select(maxfd + 1, &rfds, &wfds, NULL, NULL);
if (ret == -1) {
@@ -437,13 +432,10 @@ main_loop(void)
pjdlog_exit(EX_OSERR, "select() failed");
}
#define ISSET_FD(conn) \
(FD_ISSET((fd = proto_descriptor(conn)), &rfds) || FD_ISSET(fd, &wfds))
if (ISSET_FD(cfg->hc_controlconn))
if (FD_ISSET(cfd, &rfds) || FD_ISSET(cfd, &wfds))
control_handle(cfg);
if (ISSET_FD(cfg->hc_listenconn))
if (FD_ISSET(lfd, &rfds) || FD_ISSET(lfd, &wfds))
listen_accept();
#undef ISSET_FD
}
}
+10 -6
View File
@@ -96,6 +96,7 @@ metadata_read(struct hast_resource *res, bool openrw)
rerrno = errno;
pjdlog_errno(LOG_ERR,
"Unable to allocate memory to read metadata");
ebuf_free(eb);
goto fail;
}
buf = ebuf_data(eb, NULL);
@@ -154,6 +155,7 @@ metadata_read(struct hast_resource *res, bool openrw)
nv_free(nv);
goto fail;
}
nv_free(nv);
return (0);
fail:
if (opened_here) {
@@ -172,6 +174,7 @@ metadata_write(struct hast_resource *res)
unsigned char *buf, *ptr;
size_t size;
ssize_t done;
int ret;
buf = calloc(1, METADATA_SIZE);
if (buf == NULL) {
@@ -180,6 +183,8 @@ metadata_write(struct hast_resource *res)
return (-1);
}
ret = -1;
nv = nv_alloc();
nv_add_string(nv, res->hr_name, "resource");
nv_add_uint64(nv, (uint64_t)res->hr_datasize, "datasize");
@@ -199,7 +204,7 @@ metadata_write(struct hast_resource *res)
nv_add_string(nv, role2str(res->hr_role), "prevrole");
if (nv_error(nv) != 0) {
pjdlog_error("Unable to create metadata.");
goto fail;
goto end;
}
res->hr_previous_role = res->hr_role;
eb = nv_hton(nv);
@@ -211,12 +216,11 @@ metadata_write(struct hast_resource *res)
done = pwrite(res->hr_localfd, buf, METADATA_SIZE, 0);
if (done < 0 || done != METADATA_SIZE) {
pjdlog_errno(LOG_ERR, "Unable to write metadata");
goto fail;
goto end;
}
return (0);
fail:
ret = 0;
end:
free(buf);
nv_free(nv);
return (-1);
return (ret);
}
+2
View File
@@ -707,8 +707,10 @@ nv_add(struct nv *nv, const unsigned char *value, size_t vsize, int type,
assert(errno != 0);
if (nv->nv_error == 0)
nv->nv_error = errno;
free(nvh);
return;
}
free(nvh);
/* Add the actual data. */
if (ebuf_add_tail(nv->nv_ebuf, value, vsize) < 0) {
assert(errno != 0);
+5 -1
View File
@@ -195,7 +195,10 @@ static pthread_mutex_t metadata_lock;
mtx_unlock(&hio_##name##_list_lock); \
} while (0)
#define SYNCREQ(hio) do { (hio)->hio_ggio.gctl_unit = -1; } while (0)
#define SYNCREQ(hio) do { \
(hio)->hio_ggio.gctl_unit = -1; \
(hio)->hio_ggio.gctl_seq = 1; \
} while (0)
#define ISSYNCREQ(hio) ((hio)->hio_ggio.gctl_unit == -1)
#define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0)
#define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2)
@@ -447,6 +450,7 @@ init_local(struct hast_resource *res)
primary_exit(EX_NOINPUT, "Unable to read activemap");
}
activemap_copyin(res->hr_amp, buf, mapsize);
free(buf);
if (res->hr_resuid != 0)
return;
/*
+2 -1
View File
@@ -295,6 +295,7 @@ init_remote(struct hast_resource *res, struct nv *nvin)
nv_free(nvout);
exit(EX_TEMPFAIL);
}
nv_free(nvout);
if (res->hr_secondary_localcnt > res->hr_primary_remotecnt &&
res->hr_primary_localcnt > res->hr_secondary_remotecnt) {
/* Exit on split-brain. */
@@ -687,7 +688,7 @@ send_thread(void *arg)
pjdlog_exit(EX_TEMPFAIL, "Unable to send reply.");
}
nv_free(nvout);
pjdlog_debug(2, "disk: (%p) Moving request to the free queue.",
pjdlog_debug(2, "send: (%p) Moving request to the free queue.",
hio);
nv_free(hio->hio_nv);
hio->hio_error = 0;
+1 -1
View File
@@ -49,7 +49,7 @@
*default host=CHANGE_THIS.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default release=cvs tag=RELENG_8_1
*default delete use-rel-suffix
# If you seem to be limited by CPU rather than network or disk bandwidth, try
@@ -33,13 +33,9 @@
#include <sys/zio_compress.h>
#include <sys/zio_checksum.h>
#if defined(__amd64__)
static int zio_use_uma = 1;
#else
static int zio_use_uma = 0;
#endif
SYSCTL_DECL(_vfs_zfs);
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO");
static int zio_use_uma = 0;
TUNABLE_INT("vfs.zfs.zio.use_uma", &zio_use_uma);
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0,
"Use uma(9) for ZIO allocations");
+1 -1
View File
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="8.1"
BRANCH="PRERELEASE"
BRANCH="RELEASE"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
+3 -1
View File
@@ -1009,6 +1009,8 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context)
if (isc->cpu_cx_count > cpu_cx_count)
cpu_cx_count = isc->cpu_cx_count;
}
if (sc->cpu_cx_lowest < cpu_cx_lowest)
acpi_cpu_set_cx_lowest(sc, min(cpu_cx_lowest, sc->cpu_cx_count - 1));
ACPI_SERIAL_END(cpu);
}
@@ -1204,7 +1206,7 @@ acpi_cpu_global_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS)
ACPI_SERIAL_BEGIN(cpu);
for (i = 0; i < cpu_ndevices; i++) {
sc = device_get_softc(cpu_devices[i]);
acpi_cpu_set_cx_lowest(sc, val);
acpi_cpu_set_cx_lowest(sc, min(val, sc->cpu_cx_count - 1));
}
ACPI_SERIAL_END(cpu);
+1 -1
View File
@@ -612,7 +612,7 @@
AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20)
#define AR_SREV_MERLIN_20_OR_LATER(_ah) \
(AR_SREV_MERLIN_20(_ah) || \
AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN)
AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN)
#define AR_SREV_KITE(_ah) \
(AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE)
+4
View File
@@ -1823,6 +1823,10 @@ scsi_done:
strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN);
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
cpi->transport = XPORT_SPI;
cpi->transport_version = 2;
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_2;
cpi->ccb_h.status = CAM_REQ_CMP;
break;
}
+4
View File
@@ -2414,6 +2414,10 @@ hpt_action(struct cam_sim *sim, union ccb *ccb)
strncpy(cpi->hba_vid, "HPT ", HBA_IDLEN);
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
cpi->unit_number = cam_sim_unit(sim);
cpi->transport = XPORT_SPI;
cpi->transport_version = 2;
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_2;
cpi->ccb_h.status = CAM_REQ_CMP;
xpt_done(ccb);
break;
+2 -2
View File
@@ -210,7 +210,7 @@ g_gate_start(struct bio *bp)
}
static struct g_gate_softc *
g_gate_hold(u_int unit, const char *name)
g_gate_hold(int unit, const char *name)
{
struct g_gate_softc *sc = NULL;
@@ -572,8 +572,8 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa
switch (bp->bio_cmd) {
case BIO_READ:
break;
case BIO_DELETE:
break;
case BIO_WRITE:
error = copyout(bp->bio_data, ggio->gctl_data,
bp->bio_length);
+2 -2
View File
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/md_var.h>
#define MAX_BPAGES 256
#define MAX_BPAGES 1024
struct bus_dma_tag {
bus_dma_tag_t parent;
@@ -77,7 +77,7 @@ struct bounce_page {
STAILQ_ENTRY(bounce_page) links;
};
int busdma_swi_pending;
u_int busdma_swi_pending;
static struct mtx bounce_lock;
static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list;
+38
View File
@@ -170,6 +170,27 @@ ENTRY_NOPROFILE(exception_save, 0)
* r30,r31=trapframe pointers
* p14,p15=memory stack switch
*/
/* PTC.G enter non-exclusive */
mov r24 = ar.ccv
movl r25 = pmap_ptc_g_sem
;;
.ptc_g_0:
ld8.acq r26 = [r25]
;;
tbit.nz p12, p0 = r26, 63
(p12) br.cond.spnt.few .ptc_g_0
;;
mov ar.ccv = r26
adds r27 = 1, r26
;;
cmpxchg8.rel r27 = [r25], r27, ar.ccv
;;
cmp.ne p12, p0 = r26, r27
(p12) br.cond.spnt.few .ptc_g_0
;;
mov ar.ccv = r24
exception_save_restart:
{ .mmi
st8 [r30]=r19,16 // length
@@ -407,6 +428,23 @@ exception_save_restart:
movl gp=__gp
;;
}
/* PTC.G leave non-exclusive */
srlz.d
movl r25 = pmap_ptc_g_sem
;;
.ptc_g_1:
ld8.acq r26 = [r25]
;;
mov ar.ccv = r26
adds r27 = -1, r26
;;
cmpxchg8.rel r27 = [r25], r27, ar.ccv
;;
cmp.ne p12, p0 = r26, r27
(p12) br.cond.spnt.few .ptc_g_1
;;
{ .mib
srlz.d
nop 0
+29 -6
View File
@@ -182,7 +182,8 @@ static uint64_t pmap_ptc_e_count1 = 3;
static uint64_t pmap_ptc_e_count2 = 2;
static uint64_t pmap_ptc_e_stride1 = 0x2000;
static uint64_t pmap_ptc_e_stride2 = 0x100000000;
struct mtx pmap_ptcmutex;
volatile u_long pmap_ptc_g_sem;
/*
* Data for the RID allocator
@@ -340,7 +341,6 @@ pmap_bootstrap()
pmap_ptc_e_count2,
pmap_ptc_e_stride1,
pmap_ptc_e_stride2);
mtx_init(&pmap_ptcmutex, "Global PTC lock", NULL, MTX_SPIN);
/*
* Setup RIDs. RIDs 0..7 are reserved for the kernel.
@@ -540,7 +540,8 @@ pmap_invalidate_page(vm_offset_t va)
{
struct ia64_lpte *pte;
struct pcpu *pc;
uint64_t tag;
uint64_t tag, sem;
register_t is;
u_int vhpt_ofs;
critical_enter();
@@ -550,10 +551,32 @@ pmap_invalidate_page(vm_offset_t va)
pte = (struct ia64_lpte *)(pc->pc_md.vhpt + vhpt_ofs);
atomic_cmpset_64(&pte->tag, tag, 1UL << 63);
}
critical_exit();
mtx_lock_spin(&pmap_ptcmutex);
/* PTC.G enter exclusive */
is = intr_disable();
/* Atomically assert writer after all writers have gone. */
do {
/* Wait until there's no more writer. */
do {
sem = atomic_load_acq_long(&pmap_ptc_g_sem);
tag = sem | (1ul << 63);
} while (sem == tag);
} while (!atomic_cmpset_rel_long(&pmap_ptc_g_sem, sem, tag));
/* Wait until all readers are gone. */
tag = (1ul << 63);
do {
sem = atomic_load_acq_long(&pmap_ptc_g_sem);
} while (sem != tag);
ia64_ptc_ga(va, PAGE_SHIFT << 2);
mtx_unlock_spin(&pmap_ptcmutex);
/* PTC.G leave exclusive */
atomic_store_rel_long(&pmap_ptc_g_sem, 0);
intr_restore(is);
critical_exit();
}
static void
+2 -3
View File
@@ -378,9 +378,8 @@ sf_buf_free(struct sf_buf *sf)
*/
void
swi_vm(void *dummy)
{
#if 0
{
if (busdma_swi_pending != 0)
busdma_swi();
#endif
}
+1
View File
@@ -75,6 +75,7 @@ struct ia64_init_return {
extern uint64_t ia64_lapic_addr;
extern long Maxmem;
extern u_int busdma_swi_pending;
void busdma_swi(void);
int copyout_regstack(struct thread *, uint64_t *, uint64_t *);
+1
View File
@@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m)
n->m_ext.ref_cnt = m->m_ext.ref_cnt;
n->m_ext.ext_type = m->m_ext.ext_type;
n->m_flags |= M_EXT;
n->m_flags |= m->m_flags & M_RDONLY;
}
/*
+3 -2
View File
@@ -2413,7 +2413,7 @@ sctp_generic_sendmsg (td, uap)
if (error)
goto sctp_bad;
#ifdef KTRACE
if (KTRPOINT(td, KTR_STRUCT))
if (to && (KTRPOINT(td, KTR_STRUCT)))
ktrsockaddr(to);
#endif
@@ -2527,7 +2527,7 @@ sctp_generic_sendmsg_iov(td, uap)
if (error)
goto sctp_bad1;
#ifdef KTRACE
if (KTRPOINT(td, KTR_STRUCT))
if (to && (KTRPOINT(td, KTR_STRUCT)))
ktrsockaddr(to);
#endif
@@ -2681,6 +2681,7 @@ sctp_generic_recvmsg(td, uap)
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);
#endif /* KTRACE */
memset(&sinfo, 0, sizeof(struct sctp_sndrcvinfo));
CURVNET_SET(so->so_vnet);
error = sctp_sorecvmsg(so, &auio, (struct mbuf **)NULL,
fromsa, fromlen, &msg_flags,
-13
View File
@@ -822,19 +822,6 @@ static struct kproc_desc vnlru_kp = {
SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start,
&vnlru_kp);
static void
vfs_lowmem(void *arg __unused)
{
/*
* On low memory condition free 1/8th of the free vnodes.
*/
mtx_lock(&vnode_free_list_mtx);
vnlru_free(freevnodes / 8);
mtx_unlock(&vnode_free_list_mtx);
}
EVENTHANDLER_DEFINE(vm_lowmem, vfs_lowmem, NULL, 0);
/*
* Routines having to do with the management of the vnode table.
*/
+1 -1
View File
@@ -1626,7 +1626,7 @@ flowtable_init(const void *unused __unused)
EVENTHANDLER_PRI_ANY);
flowclean_freq = 20*hz;
}
SYSINIT(flowtable_init, SI_SUB_SMP, SI_ORDER_MIDDLE,
SYSINIT(flowtable_init, SI_SUB_KTHREAD_INIT, SI_ORDER_FIRST,
flowtable_init, NULL);
+3 -2
View File
@@ -1636,7 +1636,7 @@ done:
* is most specific found.
*/
struct ifaddr *
ifa_ifwithnet(struct sockaddr *addr)
ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp)
{
struct ifnet *ifp;
struct ifaddr *ifa;
@@ -1668,7 +1668,8 @@ ifa_ifwithnet(struct sockaddr *addr)
if (ifa->ifa_addr->sa_family != af)
next: continue;
if (af == AF_INET && ifp->if_flags & IFF_POINTOPOINT) {
if (af == AF_INET &&
ifp->if_flags & IFF_POINTOPOINT && !ignore_ptp) {
/*
* This is a bit broken as it doesn't
* take into account that the remote end may
+1 -1
View File
@@ -875,7 +875,7 @@ struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
int ifa_ifwithaddr_check(struct sockaddr *);
struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithnet(struct sockaddr *);
struct ifaddr *ifa_ifwithnet(struct sockaddr *, int);
struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *);
struct ifaddr *ifa_ifwithroute_fib(int, struct sockaddr *, struct sockaddr *, u_int);
+3 -3
View File
@@ -519,7 +519,7 @@ rtredirect_fib(struct sockaddr *dst,
}
/* verify the gateway is directly reachable */
if ((ifa = ifa_ifwithnet(gateway)) == NULL) {
if ((ifa = ifa_ifwithnet(gateway, 0)) == NULL) {
error = ENETUNREACH;
goto out;
}
@@ -686,7 +686,7 @@ ifa_ifwithroute_fib(int flags, struct sockaddr *dst, struct sockaddr *gateway,
ifa = ifa_ifwithdstaddr(gateway);
}
if (ifa == NULL)
ifa = ifa_ifwithnet(gateway);
ifa = ifa_ifwithnet(gateway, 0);
if (ifa == NULL) {
struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum);
if (rt == NULL)
@@ -797,7 +797,7 @@ rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum)
*/
if (info->rti_ifp == NULL && ifpaddr != NULL &&
ifpaddr->sa_family == AF_LINK &&
(ifa = ifa_ifwithnet(ifpaddr)) != NULL) {
(ifa = ifa_ifwithnet(ifpaddr, 0)) != NULL) {
info->rti_ifp = ifa->ifa_ifp;
ifa_free(ifa);
}
+16 -5
View File
@@ -55,6 +55,7 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_llatbl.h>
#include <net/if_types.h>
#include <net/netisr.h>
#include <net/raw_cb.h>
#include <net/route.h>
@@ -673,12 +674,22 @@ route_output(struct mbuf *m, struct socket *so)
* another search to retrieve the prefix route of
* the local end point of the PPP link.
*/
if ((rtm->rtm_flags & RTF_ANNOUNCE) &&
(rt->rt_ifp->if_flags & IFF_POINTOPOINT)) {
if (rtm->rtm_flags & RTF_ANNOUNCE) {
struct sockaddr laddr;
rt_maskedcopy(rt->rt_ifa->ifa_addr,
&laddr,
rt->rt_ifa->ifa_netmask);
if (rt->rt_ifp != NULL &&
rt->rt_ifp->if_type == IFT_PROPVIRTUAL) {
struct ifaddr *ifa;
ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1);
if (ifa != NULL)
rt_maskedcopy(ifa->ifa_addr,
&laddr,
ifa->ifa_netmask);
} else
rt_maskedcopy(rt->rt_ifa->ifa_addr,
&laddr,
rt->rt_ifa->ifa_netmask);
/*
* refactor rt and no lock operation necessary
*/
+3 -2
View File
@@ -1379,8 +1379,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr
/* XXX rtalloc1 should take a const param */
rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0);
if (rt == NULL || (rt->rt_flags & RTF_GATEWAY) ||
((rt->rt_ifp != ifp) && !(flags & LLE_PUB))) {
if (rt == NULL || (!(flags & LLE_PUB) &&
((rt->rt_flags & RTF_GATEWAY) ||
(rt->rt_ifp != ifp)))) {
#ifdef DIAGNOSTIC
log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
+2 -2
View File
@@ -590,7 +590,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin));
if (ia == NULL)
ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin));
ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0));
if (ia == NULL) {
error = ENETUNREACH;
goto done;
@@ -707,7 +707,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain)));
if (ia == NULL)
ia = ifatoia(ifa_ifwithnet(sintosa(&sain)));
ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0));
if (ia == NULL)
ia = ifatoia(ifa_ifwithaddr(sintosa(&sain)));
+1 -1
View File
@@ -230,7 +230,7 @@ dropit:
#define INA struct in_ifaddr *
#define SA struct sockaddr *
if ((ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr)) == NULL)
ia = (INA)ifa_ifwithnet((SA)&ipaddr);
ia = (INA)ifa_ifwithnet((SA)&ipaddr, 0);
} else
/* XXX MRT 0 for routing */
ia = ip_rtaddr(ipaddr.sin_addr, M_GETFIB(m));
+1 -1
View File
@@ -247,7 +247,7 @@ again:
isbroadcast = 1;
} else if (flags & IP_ROUTETOIF) {
if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL &&
(ia = ifatoia(ifa_ifwithnet(sintosa(dst)))) == NULL) {
(ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0))) == NULL) {
IPSTAT_INC(ips_noroute);
error = ENETUNREACH;
goto bad;
+3 -1
View File
@@ -826,6 +826,7 @@ send_reply:
ack->serial_number = serial_num;
ack->last_sent_to = NULL;
ack->data = m_ack;
ack->len = 0;
n = m_ack;
while (n) {
ack->len += SCTP_BUF_LEN(n);
@@ -1025,7 +1026,8 @@ sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct sctp_ifn *ifn)
* address.
*/
if (SCTP_ROUTE_HAS_VALID_IFN(&net->ro) &&
SCTP_GET_IF_INDEX_FROM_ROUTE(&net->ro) != ifn->ifn_index) {
((ifn == NULL) ||
(SCTP_GET_IF_INDEX_FROM_ROUTE(&net->ro) != ifn->ifn_index))) {
/* clear any cached route */
RTFREE(net->ro.ro_rt);
net->ro.ro_rt = NULL;
+17 -12
View File
@@ -3074,6 +3074,9 @@ sctp_iterator_inp_being_freed(struct sctp_inpcb *inp)
SCTP_FREE(it, SCTP_M_ITER);
} else {
it->inp = LIST_NEXT(it->inp, sctp_list);
if (it->inp) {
SCTP_INP_INCR_REF(it->inp);
}
}
/*
* When its put in the refcnt is incremented so decr
@@ -3114,17 +3117,10 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
#ifdef SCTP_LOG_CLOSING
sctp_log_closing(inp, NULL, 0);
#endif
if (from == SCTP_CALLED_AFTER_CMPSET_OFCLOSE) {
/*
* Once we are in we can remove the flag from = 1 is only
* passed from the actual closing routines that are called
* via the sockets layer.
*/
SCTP_ITERATOR_LOCK();
/* mark any iterators on the list or being processed */
sctp_iterator_inp_being_freed(inp);
SCTP_ITERATOR_UNLOCK();
}
SCTP_ITERATOR_LOCK();
/* mark any iterators on the list or being processed */
sctp_iterator_inp_being_freed(inp);
SCTP_ITERATOR_UNLOCK();
so = inp->sctp_socket;
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) {
/* been here before.. eeks.. get out of here */
@@ -4637,7 +4633,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
atomic_add_int(&stcb->asoc.refcnt, 1);
SCTP_TCB_UNLOCK(stcb);
SCTP_INP_INFO_WLOCK();
SCTP_INP_WLOCK(inp);
SCTP_TCB_LOCK(stcb);
@@ -4680,6 +4675,16 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
if (from_inpcbfree == SCTP_NORMAL_PROC) {
atomic_add_int(&stcb->asoc.refcnt, -1);
}
if (stcb->asoc.refcnt) {
stcb->asoc.state &= ~SCTP_STATE_IN_ACCEPT_QUEUE;
sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL);
if (from_inpcbfree == SCTP_NORMAL_PROC) {
SCTP_INP_INFO_WUNLOCK();
SCTP_INP_WUNLOCK(inp);
}
SCTP_TCB_UNLOCK(stcb);
return (0);
}
asoc->state = 0;
if (inp->sctp_tcbhash) {
LIST_REMOVE(stcb, sctp_tcbhash);
+6 -1
View File
@@ -670,6 +670,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
vm_size_t size, physsz, hwphyssz;
vm_offset_t pa, va, off;
void *dpcpu;
register_t msr;
/*
* Set up BAT0 to map the lowest 256 MB area
@@ -700,12 +701,16 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
/*
* Use an IBAT and a DBAT to map the bottom segment of memory
* where we are.
* where we are. Turn off instruction relocation temporarily
* to prevent faults while reprogramming the IBAT.
*/
msr = mfmsr();
mtmsr(msr & ~PSL_IR);
__asm (".balign 32; \n"
"mtibatu 0,%0; mtibatl 0,%1; isync; \n"
"mtdbatu 0,%0; mtdbatl 0,%1; isync"
:: "r"(battable[0].batu), "r"(battable[0].batl));
mtmsr(msr);
/* map pci space */
__asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+24 -8
View File
@@ -38,6 +38,9 @@
#ifndef LOCORE
#include <sys/proc.h>
#include <sys/sched.h>
#include <machine/intr_machdep.h>
#include <machine/pcb.h>
#include <machine/tte.h>
@@ -139,6 +142,7 @@ ipi_dcache_page_inval(void *func, vm_paddr_t pa)
if (smp_cpus == 1)
return (NULL);
sched_pin();
ica = &ipi_cache_args;
mtx_lock_spin(&ipi_mtx);
ica->ica_mask = all_cpus;
@@ -154,6 +158,7 @@ ipi_icache_page_inval(void *func, vm_paddr_t pa)
if (smp_cpus == 1)
return (NULL);
sched_pin();
ica = &ipi_cache_args;
mtx_lock_spin(&ipi_mtx);
ica->ica_mask = all_cpus;
@@ -170,8 +175,11 @@ ipi_tlb_context_demap(struct pmap *pm)
if (smp_cpus == 1)
return (NULL);
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0)
sched_pin();
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0) {
sched_unpin();
return (NULL);
}
ita = &ipi_tlb_args;
mtx_lock_spin(&ipi_mtx);
ita->ita_mask = cpus | PCPU_GET(cpumask);
@@ -189,8 +197,11 @@ ipi_tlb_page_demap(struct pmap *pm, vm_offset_t va)
if (smp_cpus == 1)
return (NULL);
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0)
sched_pin();
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0) {
sched_unpin();
return (NULL);
}
ita = &ipi_tlb_args;
mtx_lock_spin(&ipi_mtx);
ita->ita_mask = cpus | PCPU_GET(cpumask);
@@ -208,8 +219,11 @@ ipi_tlb_range_demap(struct pmap *pm, vm_offset_t start, vm_offset_t end)
if (smp_cpus == 1)
return (NULL);
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0)
sched_pin();
if ((cpus = (pm->pm_active & PCPU_GET(other_cpus))) == 0) {
sched_unpin();
return (NULL);
}
ita = &ipi_tlb_args;
mtx_lock_spin(&ipi_mtx);
ita->ita_mask = cpus | PCPU_GET(cpumask);
@@ -230,6 +244,7 @@ ipi_wait(void *cookie)
while (*mask != 0)
;
mtx_unlock_spin(&ipi_mtx);
sched_unpin();
}
}
@@ -242,35 +257,36 @@ ipi_wait(void *cookie)
#ifndef LOCORE
static __inline void *
ipi_dcache_page_inval(void *func, vm_paddr_t pa)
ipi_dcache_page_inval(void *func __unused, vm_paddr_t pa __unused)
{
return (NULL);
}
static __inline void *
ipi_icache_page_inval(void *func, vm_paddr_t pa)
ipi_icache_page_inval(void *func __unused, vm_paddr_t pa __unused)
{
return (NULL);
}
static __inline void *
ipi_tlb_context_demap(struct pmap *pm)
ipi_tlb_context_demap(struct pmap *pm __unused)
{
return (NULL);
}
static __inline void *
ipi_tlb_page_demap(struct pmap *pm, vm_offset_t va)
ipi_tlb_page_demap(struct pmap *pm __unused, vm_offset_t va __unused)
{
return (NULL);
}
static __inline void *
ipi_tlb_range_demap(struct pmap *pm, vm_offset_t start, vm_offset_t end)
ipi_tlb_range_demap(struct pmap *pm __unused, vm_offset_t start __unused,
__unused vm_offset_t end)
{
return (NULL);
+1 -1
View File
@@ -207,7 +207,7 @@ ENTRY(mp_startup)
bl %icc, 2f
nop
cmp %l1, CPU_IMPL_ULTRASPARCIII
bl %icc, 3f
bl %icc, 4f
nop
2: mov CPU_STICKSYNC, %l2
membar #StoreLoad
+1 -1
View File
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 800505 /* Master, propagated to newvers */
#define __FreeBSD_version 801000 /* Master, propagated to newvers */
#ifndef LOCORE
#include <sys/types.h>
+3
View File
@@ -732,6 +732,9 @@ tcpDeviceSelect(void)
return (NULL);
}
devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
cnt = deviceCount(devs);
if ((!RunningAsInit) && (variable_check("NETWORK_CONFIGURED=NO") != TRUE)) {
if (!msgYesNo("Running multi-user, assume that the network is already configured?"))
return devs[0];