rapidio/tsi721: fix queue wrapping bug in inbound doorbell handler
authorAlexandre Bounine <alexandre.bounine@idt.com>
Mon, 5 Mar 2012 22:59:21 +0000 (14:59 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 19:31:27 +0000 (12:31 -0700)
commit51ee89d8195e9529e41ba46ae84a2329fe56f805
treeb82e4c77530416dde9b4b294465894402a173a10
parentfcf3a2fb3c0a579d6ab0beb8315bbe3e95cca17e
rapidio/tsi721: fix queue wrapping bug in inbound doorbell handler

commit b24823e61bfd93d0e72088e4f5245287582ed289 upstream.

Fix a bug that causes a kernel panic when the number of received doorbells
is larger than number of entries in the inbound doorbell queue (current
default value = 512).

Another possible indication for this bug is large number of spurious
doorbells reported by tsi721 driver after reaching the queue size maximum.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Chul Kim <chul.kim@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rapidio/devices/tsi721.c