diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index fafd056..957ca18 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -170,11 +170,17 @@ cifs_buf_get(void) void cifs_buf_release(void *buf_to_free) { - + struct smb_hdr *smb; if (buf_to_free == NULL) { /* cFYI(1, ("Null buffer passed to cifs_buf_release"));*/ return; } + smb = (struct smb_hdr *)buf_to_free; + if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) { + dump_stack(); + BUG(); + } + mempool_free(buf_to_free,cifs_req_poolp); atomic_dec(&bufAllocCount);