lkml.org 
[lkml]   [2008]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] synclink_gt fix locking in error path of rx enable
From
Date
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 */
}



\
 
 \ /
  Last update: 2008-07-18 17:31    [W:0.095 / U:9.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site