All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.5.41] trap in __release_resource
@ 2002-10-09 17:19 David Kleikamp
  2002-10-09 17:54 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: David Kleikamp @ 2002-10-09 17:19 UTC (permalink / raw)
  To: rmk; +Cc: linux-kernel

Russell,
I was getting a NULL pointer dereference in __release_resource when I tried
to boot 2.5.41.  I traced it down to your recent patch to 8250.c.  Since
the call to serial8250_request_std_resource() is now conditional, the call
to release_resource() needs to be conditional as well.  This patch fixes
the problem.  It looks obviously correct to me, but I don't know this code
at all.

Thanks,
Shaggy

diff -Nur linux-2.5.41/drivers/serial/8250.c linux/drivers/serial/8250.c
--- linux-2.5.41/drivers/serial/8250.c	Wed Oct  9 11:16:52 2002
+++ linux/drivers/serial/8250.c	Wed Oct  9 11:17:19 2002
@@ -1636,7 +1636,7 @@
 	if (up->port.type != PORT_RSA && res_rsa)
 		release_resource(res_rsa);
 
-	if (up->port.type == PORT_UNKNOWN)
+	if (up->port.type == PORT_UNKNOWN && res_std)
 		release_resource(res_std);
 }
 

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

* Re: [PATCH 2.5.41] trap in __release_resource
  2002-10-09 17:19 [PATCH 2.5.41] trap in __release_resource David Kleikamp
@ 2002-10-09 17:54 ` Russell King
  2002-10-09 17:56   ` Dave Kleikamp
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2002-10-09 17:54 UTC (permalink / raw)
  To: David Kleikamp; +Cc: linux-kernel

On Wed, Oct 09, 2002 at 12:19:11PM -0500, David Kleikamp wrote:
> I was getting a NULL pointer dereference in __release_resource when I tried
> to boot 2.5.41.  I traced it down to your recent patch to 8250.c.  Since
> the call to serial8250_request_std_resource() is now conditional, the call
> to release_resource() needs to be conditional as well.  This patch fixes
> the problem.  It looks obviously correct to me, but I don't know this code
> at all.

Oddly, I've also sent this patch out in the last couple of days. 8)
Its correct.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH 2.5.41] trap in __release_resource
  2002-10-09 17:54 ` Russell King
@ 2002-10-09 17:56   ` Dave Kleikamp
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Kleikamp @ 2002-10-09 17:56 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

On Wednesday 09 October 2002 12:54, Russell King wrote:
>
> Oddly, I've also sent this patch out in the last couple of days. 8)
> Its correct.

Okay, I found it now.  It was the second part of a patch that fixed 
another problem.

Thanks,
Shaggy
-- 
David Kleikamp
IBM Linux Technology Center


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

end of thread, other threads:[~2002-10-09 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-09 17:19 [PATCH 2.5.41] trap in __release_resource David Kleikamp
2002-10-09 17:54 ` Russell King
2002-10-09 17:56   ` Dave Kleikamp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.