Lines Matching refs:mbuf
840 copr_msg *mbuf; in pss_coproc_ioctl() local
867 mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); in pss_coproc_ioctl()
868 if (mbuf == NULL) in pss_coproc_ioctl()
870 if (copy_from_user(mbuf, arg, sizeof(copr_msg))) { in pss_coproc_ioctl()
871 vfree(mbuf); in pss_coproc_ioctl()
874 data = (unsigned short *)(mbuf->data); in pss_coproc_ioctl()
877 for (i = 0; i < mbuf->len; i++) { in pss_coproc_ioctl()
880 mbuf->len = i; /* feed back number of WORDs sent */ in pss_coproc_ioctl()
881 err = copy_to_user(arg, mbuf, sizeof(copr_msg)); in pss_coproc_ioctl()
882 vfree(mbuf); in pss_coproc_ioctl()
887 vfree(mbuf); in pss_coproc_ioctl()
892 mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); in pss_coproc_ioctl()
893 if (mbuf == NULL) in pss_coproc_ioctl()
895 data = (unsigned short *)mbuf->data; in pss_coproc_ioctl()
898 for (i = 0; i < sizeof(mbuf->data)/sizeof(unsigned short); i++) { in pss_coproc_ioctl()
899 mbuf->len = i; /* feed back number of WORDs read */ in pss_coproc_ioctl()
907 if (copy_to_user(arg, mbuf, sizeof(copr_msg))) in pss_coproc_ioctl()
909 vfree(mbuf); in pss_coproc_ioctl()