linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6 IrDA] IrLMP open leak
@ 2003-11-05 19:41 Jean Tourrilhes
  2003-11-05 19:43 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Tourrilhes @ 2003-11-05 19:41 UTC (permalink / raw)
  To: David S. Miller, Linux kernel mailing list

ir2609_irlmp_open_leak.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~~
		<Original patch from Chris Wright>
	o [CORRECT] Prevent 'self' leak on error in irlmp_open.
		ASSERT is compiled in only with DEBUG option => risk = 0.


diff -u -p linux/net/irda/irlmp.d4.c linux/net/irda/irlmp.c
--- linux/net/irda/irlmp.d4.c	Tue Nov  4 10:52:38 2003
+++ linux/net/irda/irlmp.c	Tue Nov  4 10:53:46 2003
@@ -146,6 +146,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 sls
 	ASSERT(notify != NULL, return NULL;);
 	ASSERT(irlmp != NULL, return NULL;);
 	ASSERT(irlmp->magic == LMP_MAGIC, return NULL;);
+	ASSERT(notify->instance != NULL, return NULL;);
 
 	/*  Does the client care which Source LSAP selector it gets?  */
 	if (slsap_sel == LSAP_ANY) {
@@ -178,7 +179,6 @@ struct lsap_cb *irlmp_open_lsap(__u8 sls
 
 	init_timer(&self->watchdog_timer);
 
-	ASSERT(notify->instance != NULL, return NULL;);
 	self->notify = *notify;
 
 	self->lsap_state = LSAP_DISCONNECTED;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6 IrDA] IrLMP open leak
  2003-11-05 19:41 [PATCH 2.6 IrDA] IrLMP open leak Jean Tourrilhes
@ 2003-11-05 19:43 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-11-05 19:43 UTC (permalink / raw)
  To: jt; +Cc: jt, linux-kernel

On Wed, 5 Nov 2003 11:41:25 -0800
Jean Tourrilhes <jt@bougret.hpl.hp.com> wrote:

> ir2609_irlmp_open_leak.diff :
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 		<Original patch from Chris Wright>
> 	o [CORRECT] Prevent 'self' leak on error in irlmp_open.
> 		ASSERT is compiled in only with DEBUG option => risk = 0.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-05 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-05 19:41 [PATCH 2.6 IrDA] IrLMP open leak Jean Tourrilhes
2003-11-05 19:43 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).