if (arg) {
ulong __user *p = argp;
int i;
- if (!access_ok(VERIFY_WRITE, p,
- sizeof(ulong) * ISDN_MAX_CHANNELS * 2))
- return -EFAULT;
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
put_user(dev->ibytes[i], p++);
put_user(dev->obytes[i], p++);
char __user *p = argp;
int i;
- if (!access_ok(VERIFY_WRITE, argp,
- (ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
- * ISDN_MAX_CHANNELS))
- return -EFAULT;
-
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
if (copy_to_user(p, dev->mdm.info[i].emu.profile,
ISDN_MODEM_NUMREG))
char __user *p = argp;
int i;
- if (!access_ok(VERIFY_READ, argp,
- (ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
- * ISDN_MAX_CHANNELS))
- return -EFAULT;
-
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
if (copy_from_user(dev->mdm.info[i].emu.profile, p,
ISDN_MODEM_NUMREG))
int j = 0;
while (1) {
- if (!access_ok(VERIFY_READ, p, 1))
- return -EFAULT;
get_user(bname[j], p++);
switch (bname[j]) {
case '\0':
drvidx = 0;
if (drvidx == -1)
return -ENODEV;
- if (!access_ok(VERIFY_WRITE, argp,
- sizeof(isdn_ioctl_struct)))
- return -EFAULT;
c.driver = drvidx;
c.command = ISDN_CMD_IOCTL;
c.arg = cmd;
if (!(is->state & IPPP_OPEN))
return 0;
- if (!access_ok(VERIFY_WRITE, buf, count))
- return -EFAULT;
-
spin_lock_irqsave(&is->buflock, flags);
b = is->first->next;
save_buf = b->buf;
struct ppp_stats t;
isdn_net_local *lp = netdev_priv(dev);
- if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats)))
- return -EFAULT;
-
/* build a temporary stat struct and copy it to user space */
memset(&t, 0, sizeof(struct ppp_stats));
case ISDNLOOP_IOCTL_DEBUGVAR:
return (ulong) card;
case ISDNLOOP_IOCTL_STARTUP:
- if (!access_ok(VERIFY_READ, (void *) a, sizeof(isdnloop_sdef)))
- return -EFAULT;
return isdnloop_start(card, (isdnloop_sdef *) a);
break;
case ISDNLOOP_IOCTL_ADDCARD: