[dahdi-commits] sruffell: branch linux/2.6 r10591 -	/linux/branches/2.6/drivers/dahdi/
    SVN commits to the DAHDI project 
    dahdi-commits at lists.digium.com
       
    Thu Mar 22 13:36:05 CDT 2012
    
    
  
Author: sruffell
Date: Thu Mar 22 13:36:01 2012
New Revision: 10591
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10591
Log:
dahdi_dynamic_eth: Prevent crash is packet arrives before span is fully configured.
It was possible after a dynamic ethernet span was created for a packet to come
in before the dahdi_span was fully initialized. The result would be a NULL
pointer dereference. Now just discard any packets that might come in during
this time window.
Internal-Issue-ID: DAHLIN-280
Reported-by: Pavel Selivanov
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10587
Modified:
    linux/branches/2.6/drivers/dahdi/dahdi_dynamic_eth.c
Modified: linux/branches/2.6/drivers/dahdi/dahdi_dynamic_eth.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.6/drivers/dahdi/dahdi_dynamic_eth.c?view=diff&rev=10591&r1=10590&r2=10591
==============================================================================
--- linux/branches/2.6/drivers/dahdi/dahdi_dynamic_eth.c (original)
+++ linux/branches/2.6/drivers/dahdi/dahdi_dynamic_eth.c Thu Mar 22 13:36:01 2012
@@ -71,6 +71,8 @@
 	if (z)
 		span = z->span;
 	spin_unlock_irqrestore(&zlock, flags);
+	if (!span || !test_bit(DAHDI_FLAGBIT_REGISTERED, &span->flags))
+		return NULL;
 	return span;
 }
 
    
    
More information about the dahdi-commits
mailing list