Ticket #946: ieee80211_wireless.c.diff
| File ieee80211_wireless.c.diff, 0.8 kB (added by andrew.lunn@ascom.ch, 6 years ago) |
|---|
-
ieee80211_wireless.c
old new 5043 5051 return -EPERM; 5044 5052 if (copy_from_user(&cp, ifr->ifr_data, sizeof(cp))) 5045 5053 return -EFAULT; 5046 5054 if (access_ok(VERIFY_WRITE, ifr->ifr_name, IFNAMSIZ)) 5055 return -EFAULT; 5056 5047 5057 unit = ieee80211_new_wlanunit(); 5048 5058 if (unit == -1) 5049 5059 return -EIO; /* XXX */ … … 5054 5064 ieee80211_delete_wlanunit(unit); 5055 5065 return -EIO; 5056 5066 } 5057 /* return final device name */ 5058 strncpy(ifr->ifr_name, vap->iv_dev->name, IFNAMSIZ); 5067 5068 /* return final device name - should not fail, we have already 5069 checked above if we can access this. */ 5070 if (__copy_to_user(ifr->ifr_name, vap->iv_dev->name, IFNAMSIZ)) 5071 return -EFAULT; 5059 5072 return 0; 5060 5073 } 5061 5074 EXPORT_SYMBOL(ieee80211_ioctl_create_vap);
