Re: [PATCH] tty: cleanup release_mem

2007-01-31 Thread Christoph Hellwig
Looks good to me. I'd have only kept a pointer to the struct module, but that shouldn't matter for the actual code generated. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

[PATCH] tty: cleanup release_mem

2007-01-31 Thread Pekka J Enberg
From: Christoph Hellwig <[EMAIL PROTECTED]> release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed instead of before. [EMAIL

[PATCH] tty: cleanup release_mem

2007-01-31 Thread Pekka J Enberg
From: Christoph Hellwig [EMAIL PROTECTED] release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed instead of before. [EMAIL

Re: [PATCH] tty: cleanup release_mem

2007-01-31 Thread Christoph Hellwig
Looks good to me. I'd have only kept a pointer to the struct module, but that shouldn't matter for the actual code generated. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Pekka Enberg
On 1/30/07, Andrew Morton <[EMAIL PROTECTED]> wrote: BUG: unable to handle kernel paging request at virtual address 6b6b6bdf Use after free. The new code does module_put() _after_ free_tty_struct() which is obviously wrong. - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Andrew Morton
On Mon, 29 Jan 2007 14:06:04 -0500 Alan Cox <[EMAIL PROTECTED]> wrote: > On Mon, Jan 29, 2007 at 07:12:35PM +0100, Christoph Hellwig wrote: > > Okay. Now that we get into the details I've also added some renaming, > > release_mem becomes release_tty and the new factored out function is > >

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Alan Cox
On Mon, Jan 29, 2007 at 07:12:35PM +0100, Christoph Hellwig wrote: > Okay. Now that we get into the details I've also added some renaming, > release_mem becomes release_tty and the new factored out function is > release_one_tty. The difference is documented in the kdoc comments. > > >

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Christoph Hellwig
On Mon, Jan 29, 2007 at 07:01:00AM -0500, Alan Cox wrote: > On Sun, Jan 28, 2007 at 06:12:44PM +0100, Christoph Hellwig wrote: > > release_mem contains two copies of exactly the same code. Refactor > > these into a new helper, release_tty. The only change in behaviour > > is that the driver

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Alan Cox
On Sun, Jan 28, 2007 at 06:12:44PM +0100, Christoph Hellwig wrote: > release_mem contains two copies of exactly the same code. Refactor > these into a new helper, release_tty. The only change in behaviour > is that the driver reference count is now decremented after the > master tty has been

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Alan Cox
On Sun, Jan 28, 2007 at 06:12:44PM +0100, Christoph Hellwig wrote: release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Christoph Hellwig
On Mon, Jan 29, 2007 at 07:01:00AM -0500, Alan Cox wrote: On Sun, Jan 28, 2007 at 06:12:44PM +0100, Christoph Hellwig wrote: release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Alan Cox
On Mon, Jan 29, 2007 at 07:12:35PM +0100, Christoph Hellwig wrote: Okay. Now that we get into the details I've also added some renaming, release_mem becomes release_tty and the new factored out function is release_one_tty. The difference is documented in the kdoc comments. Signed-off-by:

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Andrew Morton
On Mon, 29 Jan 2007 14:06:04 -0500 Alan Cox [EMAIL PROTECTED] wrote: On Mon, Jan 29, 2007 at 07:12:35PM +0100, Christoph Hellwig wrote: Okay. Now that we get into the details I've also added some renaming, release_mem becomes release_tty and the new factored out function is

Re: [PATCH] tty: cleanup release_mem

2007-01-29 Thread Pekka Enberg
On 1/30/07, Andrew Morton [EMAIL PROTECTED] wrote: BUG: unable to handle kernel paging request at virtual address 6b6b6bdf Use after free. The new code does module_put() _after_ free_tty_struct() which is obviously wrong. - To unsubscribe from this list: send the line unsubscribe linux-kernel

[PATCH] tty: cleanup release_mem

2007-01-28 Thread Christoph Hellwig
release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed instead of before. Signed-off-by: Christoph Hellwig <[EMAIL

[PATCH] tty: cleanup release_mem

2007-01-28 Thread Christoph Hellwig
release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed instead of before. Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]