[dahdi-commits] kmoore: linux/trunk r9907 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Apr 15 13:42:19 CDT 2011
Author: kmoore
Date: Fri Apr 15 13:42:16 2011
New Revision: 9907
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9907
Log:
dahdi: Bug fix for enabling buffer events
Introduced in rev 9905, this bug could cause buffer events to become
disabled if the kernel was unable to access userland data.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9907&r1=9906&r2=9907
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Fri Apr 15 13:42:16 2011
@@ -6279,7 +6279,9 @@
break;
#endif
case DAHDI_BUFFER_EVENTS:
- if (get_user(j, (int __user *)data) != -EFAULT && j)
+ if (get_user(j, (int __user *)data))
+ return -EFAULT;
+ if (j)
set_bit(DAHDI_FLAGBIT_BUFEVENTS, &chan->flags);
else
clear_bit(DAHDI_FLAGBIT_BUFEVENTS, &chan->flags);
More information about the dahdi-commits
mailing list