Commit 5c652d98 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

8250: Fix oops from setserial



commit b8e7e40a upstream.

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: default avatarVictor Seryodkin <vvscore@gmail.com>
Closes-bug: #13367
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 546eeb68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment