rootnfs.patch

rumcic, 12/29/2008 10:05 PM

Download (2.63 KB)

View differences:

sys/kern/uipc_msg.c
47 47
#include <vm/pmap.h>
48 48
#include <net/netmsg2.h>
49 49

  
50
#include <machine/vmparam.h>
51

  
50 52
#include <net/netisr.h>
51 53
#include <net/netmsg.h>
52 54

  
......
414 416
	lwkt_port_t port;
415 417
	int error;
416 418

  
417
	KKASSERT(!sopt->sopt_val || kva_p(sopt->sopt_val));
419
	KKASSERT(sopt->sopt_val && (kva_p(sopt->sopt_val) || (vm_offset_t)(sopt->sopt_val) < USRSTACK));
418 420
	port = so->so_proto->pr_mport(so, NULL, NULL, PRU_CTLOUTPUT);
419 421
	netmsg_init(&msg.nm_netmsg, &curthread->td_msgport, 0,
420 422
		    netmsg_pru_ctloutput);
sys/kern/uipc_socket.c
100 100

  
101 101
#include <machine/limits.h>
102 102

  
103
#include <machine/vmparam.h>
104

  
103 105
#ifdef INET
104 106
static int	 do_setopt_accept_filter(struct socket *so, struct sockopt *sopt);
105 107
#endif /* INET */
......
1260 1262
{
1261 1263
	size_t	valsize;
1262 1264

  
1263
	KKASSERT(!sopt->sopt_val || kva_p(sopt->sopt_val));
1264
	KKASSERT(kva_p(buf));
1265
	KKASSERT(sopt->sopt_val && (kva_p(sopt->sopt_val) || (vm_offset_t)(sopt->sopt_val) < USRSTACK));
1266
	KKASSERT(kva_p(buf) || (vm_offset_t)(buf) < USRSTACK);
1265 1267

  
1266 1268
	/*
1267 1269
	 * If the user gives us more than we wanted, we ignore it,
......
1438 1440
{
1439 1441
	size_t	valsize;
1440 1442

  
1441
	KKASSERT(!sopt->sopt_val || kva_p(sopt->sopt_val));
1442
	KKASSERT(kva_p(buf));
1443
	KKASSERT(sopt->sopt_val && (kva_p(sopt->sopt_val) || (vm_offset_t)(sopt->sopt_val) < USRSTACK));
1444
	KKASSERT(kva_p(buf) || (vm_offset_t)(buf) < USRSTACK);
1443 1445

  
1444 1446
	/*
1445 1447
	 * Documented get behavior is that we always return a value,
......
1600 1602
	size_t valsize;
1601 1603
	void *val;
1602 1604

  
1603
	KKASSERT(!sopt->sopt_val || kva_p(sopt->sopt_val));
1604
	KKASSERT(kva_p(m));
1605
	KKASSERT(sopt->sopt_val && (kva_p(sopt->sopt_val) || (vm_offset_t)(sopt->sopt_val) < USRSTACK));
1606
	KKASSERT(kva_p(m) || (vm_offset_t)(m) < USRSTACK);
1605 1607
	if (sopt->sopt_val == NULL)
1606 1608
		return;
1607 1609
	val = sopt->sopt_val;
......
1631 1633
	size_t maxsize;
1632 1634
	void *val;
1633 1635

  
1634
	KKASSERT(!sopt->sopt_val || kva_p(sopt->sopt_val));
1635
	KKASSERT(kva_p(m));
1636
	KKASSERT(sopt->sopt_val && (kva_p(sopt->sopt_val) || (vm_offset_t)(sopt->sopt_val) < USRSTACK));
1637
	KKASSERT(kva_p(m) || (vm_offset_t)(m) < USRSTACK);
1636 1638
	if (sopt->sopt_val == NULL)
1637 1639
		return 0;
1638 1640
	val = sopt->sopt_val;