projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
814dae0
)
synclink_gt fix locking in error path of rx enable
author
Paul Fulghum
<
[email protected]
>
Tue, 22 Jul 2008 10:23:24 +0000
(11:23 +0100)
committer
Linus Torvalds
<
[email protected]
>
Tue, 22 Jul 2008 20:03:29 +0000
(13:03 -0700)
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 <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Alan Cox <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/synclink_gt.c
patch
|
blob
|
history
diff --git
a/drivers/char/synclink_gt.c
b/drivers/char/synclink_gt.c
index 5ffdb364ea4093cec29ff306779ebdc77ff11ab4..3e9058993e41805c0b2cd699ad836c76844fe398 100644
(file)
--- a/
drivers/char/synclink_gt.c
+++ b/
drivers/char/synclink_gt.c
@@
-2686,8
+2686,10
@@
static int rx_enable(struct slgt_info *info, int enable)
*/
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 */
}