|
@@ -28,6 +28,7 @@
|
|
|
#include <asm/io.h>
|
|
|
#include <linux/atomic.h>
|
|
|
#include <linux/uaccess.h>
|
|
|
+#include <linux/nospec.h>
|
|
|
|
|
|
#include "uPD98401.h"
|
|
|
#include "uPD98402.h"
|
|
@@ -1458,6 +1459,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
|
|
|
return -EFAULT;
|
|
|
if (pool < 0 || pool > ZATM_LAST_POOL)
|
|
|
return -EINVAL;
|
|
|
+ pool = array_index_nospec(pool,
|
|
|
+ ZATM_LAST_POOL + 1);
|
|
|
spin_lock_irqsave(&zatm_dev->lock, flags);
|
|
|
info = zatm_dev->pool_info[pool];
|
|
|
if (cmd == ZATM_GETPOOLZ) {
|