I was looking over some code for someone today. They were having problems with preemption in the write routine and couldn't understand why, since they said to take Giant for all devsw operations. In digging into the problem, I discovered the following code. Maybe you can spot the bug:
#define FOO_GIANT D_NEEDGIANT
#define FOO_GIANT 0
(FOO_GIANT is used in the devsw data structure to paper over differences between 4.x and 6.x in this driver).
I think I know who did this change, but without cvs access to the code I can't be sure. Which is good, because I think it was me, but it might have been the person I was helping out. The change was made almost 4 years ago. This code has been in there that long and it wasn't until an especially demanding application came along on a faster CPU was it a problem.
Just goes to show you can never be too careful, or test too much...