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. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9907 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
e591241187
commit
fcd4db20d1
@ -6279,7 +6279,9 @@ static int dahdi_chan_ioctl(struct file *file, unsigned int cmd, unsigned long d
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DAHDI_BUFFER_EVENTS:
|
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);
|
set_bit(DAHDI_FLAGBIT_BUFEVENTS, &chan->flags);
|
||||||
else
|
else
|
||||||
clear_bit(DAHDI_FLAGBIT_BUFEVENTS, &chan->flags);
|
clear_bit(DAHDI_FLAGBIT_BUFEVENTS, &chan->flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user