* [PATCH] synclink_gt fix locking in error path of rx enable
@ 2008-07-18 14:27 Paul Fulghum
0 siblings, 0 replies; only message in thread
From: Paul Fulghum @ 2008-07-18 14:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel@vger.kernel.org
Fix locking in error path of rx_enable() introduced by
synclink_gt-add-rx-dma-buffer-fill-level-control patch.
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
--- a/drivers/char/synclink_gt.c 2008-07-18 09:14:41.000000000 -0500
+++ b/drivers/char/synclink_gt.c 2008-07-18 09:13:57.000000000 -0500
@@ -2700,8 +2700,10 @@ static int rx_enable(struct slgt_info *i
*/
rbuf_fill_level = ((unsigned int)enable) >> 16;
if (rbuf_fill_level) {
- if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4))
+ if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4)) {
+ spin_unlock_irqrestore(&info->lock, flags);
return -EINVAL;
+ }
info->rbuf_fill_level = rbuf_fill_level;
rx_stop(info); /* restart receiver to use new fill level */
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-18 15:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 14:27 [PATCH] synclink_gt fix locking in error path of rx enable Paul Fulghum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox