lkml.org 
[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 8250: Fix oops from setserial
On Thu, 28 May 2009 14:01:35 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> From: Alan Cox <alan@linux.intel.com>
>
> [Impact: ok I just put this here to wind up Linus]
>
> If you setserial a port which has never been initialised we change the type
> but don't update the I/O method pointers. The same problem is true if you
> change the io type of a port - but nobody ever does that so nobody noticed!
>
> Remember the old type and when attaching if the type has changed reload the
> port accessor pointers. We can't do it blindly as some 8250 drivers load custom
> accessors and we must not stomp those.
>
> Closes-bug: #13367

Please quote the full bug URL.

a) for consistency

b) because there are multiple bug tracking systems out there:

y:/usr/src/git26> git-log|grep bugzilla.redhat|wc -l
123

> static void set_io_from_upio(struct uart_port *p)
> {
> + struct uart_8250_port *up = (struct uart_8250_port *)p;

container_of() is nicer, IMO. It's clearer, and doesn't require that
the uart_port be the fist member.



\
 
 \ /
  Last update: 2009-05-30 05:57    [W:0.052 / U:5.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site