Re: Problem in using Kernel Timers: Sleeping function called from invalid context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks topi
          After using the GFP_ATOMIC flag in kmalloc it's not showing the stack trace. But is it good to use this mechanism (on long term basis) for sending signals (in every 1mSec) to a server process running in user-space.
         I am not using kfree() for the task_struct *p variable because find_task_by_pid() returns a pointer to the PCB, so if i'll free the pointer then it frees that memory block and i am getting a segmentation fault.
        Please correct me if i am wrong.

regards
Ganesh

On 2/16/07, Tetsuo Handa < penguin-newbie@xxxxxxxxxxxxxxxxxxx> wrote:
Ganesh PS wrote:
> void gen_sig(void){
>     struct task_struct *p=NULL;
>     p=kmalloc(sizeof(struct task_struct), GFP_KERNEL);
>
>     p = find_task_by_pid(pid); /*Received from a user program through ioctl()*/

What is this kmalloc() for?
You don't kfree() this pointer?


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux