Re: why does it look like linked list traversing misses the head element?

2008-03-23 Thread Avishay Traeger
On Sun, 2008-03-23 at 03:46 -0400, Robert P. J. Day wrote: On Sun, 23 Mar 2008, Manish Katiyar wrote: Linux kernel development - Robert Love has a nice detailed explaination of it. ironically, that's the very book i have open in front of me at the moment and which is confusing me, since

Re: pointers and determining array size and weird code

2007-10-01 Thread Avishay Traeger
On Mon, 2007-10-01 at 06:41 -0400, Robert P. J. Day wrote: snip (Code snippets in my email are based on 2.6.22.6) so ELEMCOUNT() is clearly just an alternative to the more common ARRAY_SIZE() macro. but calling the macro SCTP_CHUNKMAP_IS_CLEAR() pretty clearly assumes that you can

Re: kernel BUG at include/linux/module.h:355!

2007-09-25 Thread Avishay Traeger
On Tue, 2007-09-25 at 17:10 -0700, Talib Alium wrote: 2.6.11. I know it is old, but I need to understand reason behind it. Talib Please don't top-post. I still can't find the BUG you're referring to. In 2.6.11, module.h, line 355, I have: void symbol_put_addr(void *addr);

Re: kernel BUG at include/linux/module.h:355!

2007-09-25 Thread Avishay Traeger
On Tue, 2007-09-25 at 16:47 -0700, Talib Alium wrote: My driver is getting this error, as a result test application gets a signal and is killed. I am pretty sure that reference count is not zero. Actually I have try_module_get(THIS_MODULE); in init_module. Talib Could you tell us

Re: why use memcpy when memmove is there

2007-08-14 Thread Avishay Traeger
On Tue, 2007-08-14 at 16:23 +0530, pradeep singh wrote: On 8/14/07, arshad hussain [EMAIL PROTECTED] wrote: [snip] then why is memcpy present in the sources can't we simply do #define memcpy memmove in include/linux/string.h or am I missing something? I don't know but memcpy

Re: time function

2007-08-01 Thread Avishay Traeger
On Wed, 2007-08-01 at 14:25 +0100, hari krishna angadi wrote: hi all, i am porting user code to kernel code.time() functions is used which prints the time in seconds.i want the respective call in kernel ? Here is how you figure it out: - time() is a system call. In general, if you

Re: System calls in user and kernel space

2007-07-31 Thread Avishay Traeger
On Tue, 2007-07-31 at 14:08 -0400, Jug Venkatesh wrote: Hi, I am writing new system calls for a security project, and I was wondering if there is any way to specify whether they will be accessible from user space or kernel space. System calls are by definition called only from user-space.

Re: struct file -- pid ?

2007-07-24 Thread Avishay Traeger
On Tue, 2007-07-24 at 19:12 +0900, NAHieu wrote: Hello, Given a file pointer (struct file *), what is the most effecient way to find out the pid of the process that manages this file pointer? I look into the file structure, but still havent seen any way to do that. There is one