Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2010 20:40:04 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-sparc64@FreeBSD.org
Subject:   Re: sparc64/80410: commit references a PR
Message-ID:  <201003312040.o2VKe4tC009917@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR sparc64/80410; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: sparc64/80410: commit references a PR
Date: Wed, 31 Mar 2010 20:37:57 +0000 (UTC)

 Author: mav
 Date: Wed Mar 31 20:37:44 2010
 New Revision: 206000
 URL: http://svn.freebsd.org/changeset/base/206000
 
 Log:
   Make ng_ppp fulfill upper protocol stack layers alignment requirements
   on platforms with strict alignment constraints.
   This fixes kernel panics on arm and probably other architectures.
   
   PR:		sparc64/80410
 
 Modified:
   head/sys/netgraph/ng_ppp.c
 
 Modified: head/sys/netgraph/ng_ppp.c
 ==============================================================================
 --- head/sys/netgraph/ng_ppp.c	Wed Mar 31 20:15:20 2010	(r205999)
 +++ head/sys/netgraph/ng_ppp.c	Wed Mar 31 20:37:44 2010	(r206000)
 @@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p it
  	const priv_p priv = NG_NODE_PRIVATE(node);
  	hook_p outHook = NULL;
  	int error;
 +#ifdef ALIGNED_POINTER
 +	struct mbuf *m, *n;
  
 +	NGI_GET_M(item, m);
 +	if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) {
 +		n = m_defrag(m, M_NOWAIT);
 +		if (n == NULL) {
 +			m_freem(m);
 +			NG_FREE_ITEM(item);
 +			return (ENOBUFS);
 +		}
 +		m = n;
 +	}
 +	NGI_M(item) = m;
 +#endif /* ALIGNED_POINTER */
  	switch (proto) {
  	    case PROT_IP:
  		if (priv->conf.enableIP)
 _______________________________________________
 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-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003312040.o2VKe4tC009917>