Changeset 6948 in vbox
- Timestamp:
- Feb 14, 2008 1:16:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/module/vboxmod.c
r6780 r6948 321 321 static int vboxadd_control_filter_mask(VBoxGuestFilterMaskInfo *pInfo) 322 322 { 323 VMMDevCtlGuestFilterMask *pReq ;323 VMMDevCtlGuestFilterMask *pReq = NULL; 324 324 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_CtlGuestFilterMask); 325 326 LogFlow(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: request received, u32OrMask=0x%x, u32NotMask=0x%x\n", pInfo->u32OrMask, pInfo->u32NotMask)); 325 327 if (RT_FAILURE(rc)) 326 { 327 Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: failed to allocate %u (%#x) bytes to cache the request. rc=%d!!\n", 328 sizeof(*pReq), sizeof(*pReq), rc)); 329 return rc; 330 } 331 332 pReq->u32OrMask = pInfo->u32OrMask; 333 pReq->u32NotMask = pInfo->u32NotMask; 334 335 rc = VbglGRPerform(&pReq->header); 328 Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: failed to allocate %u (%#x) bytes to cache the request. rc=%d!!\n", sizeof(*pReq), sizeof(*pReq), rc)); 329 else 330 { 331 pReq->u32OrMask = pInfo->u32OrMask; 332 pReq->u32NotMask = pInfo->u32NotMask; 333 rc = VbglGRPerform(&pReq->header); 334 } 336 335 if (RT_FAILURE(rc)) 337 336 Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: VbglGRPerform failed, rc=%Rrc!\n", rc)); … … 341 340 rc = pReq->header.rc; 342 341 } 343 344 VbglGRFree(&pReq->header);342 if (pReq) 343 VbglGRFree(&pReq->header); 345 344 return rc; 346 345 } … … 483 482 { 484 483 VBoxGuestFilterMaskInfo info; 485 if (copy_ to_user((void*)arg, (void*)&info, sizeof(info)))484 if (copy_from_user((void*)&info, (void*)arg, sizeof(info))) 486 485 { 487 486 LogRelFunc(("VBOXGUEST_IOCTL_CTL_FILTER_MASK: error getting parameters from user space!\n"));
Note:
See TracChangeset
for help on using the changeset viewer.