]> git.baikalelectronics.ru Git - kernel.git/commit
8250: Fix oops from setserial
authorAlan Cox <alan@linux.intel.com>
Thu, 28 May 2009 13:01:35 +0000 (14:01 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 May 2009 15:42:38 +0000 (08:42 -0700)
commitb8e5e98503591b29c9b38930211c471f5bde2837
tree56a73537ec1111098f785ef26e4aa7a2e6bdd1f2
parentd1bec4a7304f7dc16669893cd5e92ed53ce0a4e8
8250: Fix oops from setserial

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.

Tested-by: Victor Seryodkin <vvscore@gmail.com>
Closes-bug: #13367
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/8250.c