Message passing to kerenel

i want to add a system call(successfuly added) and pass the message(which contains int and a string)

/code i used my program calling system call printmsg/

message mm;
mm.m1_i1=10;
mm.m1_p1="hello";
printmsg(&mm);

/user library/

printmsg(*m1)
{
printf("integer is:%d",m1->m1_i1); /getting correct output as 10/
printf("str:%s",%s",m_in->m1_p1); /getting output as hello/
return(_syscall(FS,PRINTMSG,m1));
}

/* my system call code in misc.c */

int printmsg()
{
printf("integer is:%d",m_in.m1_i1); /getting correct output as 10/
printf("str:%s",%s",m_in.m1_p1); /*getting str: all_nr=%d slot1=%d */
return ok;
}

m_in which is a global varaible..m1 will be assigned to m_in once syscall is made. correct me if am wrong.

i could not able to pass the string to system call(kernel). am getting something like "str: all_nr=%d slot1=%d ".but if i print in user library am getting correct output.
i have sent lot of times to debug.. can onyone help me out..

The firs probelm I see is that you seem to have created a kernel module that calls the STDC user-space module: printf I am guessing you are on Linux. This probably will not work. Some implementations of the printf family call malloc, for example.

read up on kprintf