Use the "real" kfree call instead of a wrapper function.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
SpinlockRelease(gVmbusConnection.ChannelMsgLock);
WaitEventClose(openInfo->WaitEvent);
- MemFree(openInfo);
+ kfree(openInfo);
DPRINT_EXIT(VMBUS);
SpinlockRelease(gVmbusConnection.ChannelMsgLock);
WaitEventClose(msgInfo->WaitEvent);
- MemFree(msgInfo);
+ kfree(msgInfo);
DPRINT_EXIT(VMBUS);
SpinlockRelease(gVmbusConnection.ChannelMsgLock);
WaitEventClose(info->WaitEvent);
- MemFree(info);
+ kfree(info);
DPRINT_EXIT(VMBUS);
PageFree(Channel->RingBufferPages, Channel->RingBufferPageCount);
- MemFree(info);
+ kfree(info);
// If we are closing the channel during an error path in opening the channel, don't free the channel
// since the caller will free the channel
channel->InboundLock = SpinlockCreate();
if (!channel->InboundLock)
{
- MemFree(channel);
+ kfree(channel);
return NULL;
}
if (!channel->PollTimer)
{
SpinlockClose(channel->InboundLock);
- MemFree(channel);
+ kfree(channel);
return NULL;
}
{
TimerClose(channel->PollTimer);
SpinlockClose(channel->InboundLock);
- MemFree(channel);
+ kfree(channel);
return NULL;
}
WorkQueueClose(channel->ControlWQ);
DPRINT_DBG(VMBUS, "channel released (%p)", channel);
- MemFree(channel);
+ kfree(channel);
DPRINT_EXIT(VMBUS);
}
{
DPRINT_ERR(VMBUS, "Received invalid channel message type %d size %d", hdr->MessageType, size);
PrintBytes((unsigned char *)msg->u.Payload, size);
- MemFree(msg);
+ kfree(msg);
return;
}
}
// Free the msg that was allocated in VmbusOnMsgDPC()
- MemFree(msg);
+ kfree(msg);
DPRINT_EXIT(VMBUS);
}
if (msgInfo)
{
WaitEventClose(msgInfo->WaitEvent);
- MemFree(msgInfo);
+ kfree(msgInfo);
}
DPRINT_EXIT(VMBUS);
WaitEventClose(msgInfo->WaitEvent);
- MemFree(msgInfo);
+ kfree(msgInfo);
DPRINT_EXIT(VMBUS);
return 0;
if (msgInfo->WaitEvent)
WaitEventClose(msgInfo->WaitEvent);
- MemFree(msgInfo);
+ kfree(msgInfo);
}
DPRINT_EXIT(VMBUS);
Cleanup:
if (msg)
{
- MemFree(msg);
+ kfree(msg);
}
DPRINT_EXIT(VMBUS);
if (gHvContext.SignalEventBuffer)
{
- MemFree(gHvContext.SignalEventBuffer);
+ kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
}
status = HvDoHypercall(HvCallPostMessage, alignedMsg, 0) & 0xFFFF;
- MemFree((void*)addr);
+ kfree((void*)addr);
return status;
}
{
ASSERT(Device->RefCount == 0);
Device->Device->Extension = NULL;
- MemFree(Device);
+ kfree(Device);
}
if (NetDevice->ReceiveSections)
{
- MemFree(NetDevice->ReceiveSections);
+ kfree(NetDevice->ReceiveSections);
NetDevice->ReceiveSections = NULL;
NetDevice->ReceiveSectionCount = 0;
}
{
entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList);
packet = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry);
- MemFree(packet);
+ kfree(packet);
}
SpinlockClose(netDevice->ReceivePacketListLock);
entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList);
netvscPacket = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry);
- MemFree(netvscPacket);
+ kfree(netvscPacket);
}
SpinlockClose(netDevice->ReceivePacketListLock);
// reset
if (bufferlen > netPacketSize)
{
- MemFree(buffer);
+ kfree(buffer);
buffer = packet;
bufferlen = netPacketSize;
// reset
if (bufferlen > netPacketSize)
{
- MemFree(buffer);
+ kfree(buffer);
buffer = packet;
bufferlen = netPacketSize;
device->RequestLock = SpinlockCreate();
if (!device->RequestLock)
{
- MemFree(device);
+ kfree(device);
return NULL;
}
static inline void PutRndisDevice(RNDIS_DEVICE *Device)
{
SpinlockClose(Device->RequestLock);
- MemFree(Device);
+ kfree(Device);
}
static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageType, u32 MessageLength)
request->WaitEvent = WaitEventCreate();
if (!request->WaitEvent)
{
- MemFree(request);
+ kfree(request);
return NULL;
}
SpinlockRelease(Device->RequestLock);
WaitEventClose(Request->WaitEvent);
- MemFree(Request);
+ kfree(Request);
}
static inline void DumpRndisMessage(RNDIS_MESSAGE *RndisMessage)
static inline void FreeStorDevice(STORVSC_DEVICE *Device)
{
ASSERT(Device->RefCount == 0);
- MemFree(Device);
+ kfree(Device);
}
// Get the stordevice object iff exists and its refcount > 1
extern void* MemMapIO(unsigned long phys, unsigned long size);
extern void MemUnmapIO(void* virt);
-extern void MemFree(void* buf);
extern void MemoryFence(void);
extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
kunmap_atomic(VirtAddr, KM_IRQ0);
}
-void MemFree(void* buf)
-{
- kfree(buf);
-}
-
void *MemMapIO(unsigned long phys, unsigned long size)
{
#if X2V_LINUX