提交 abe33fc0 编写于 作者: K Kevin McKinney 提交者: Greg Kroah-Hartman

Staging: bcm: Fix semaphore locking bug in, IOCTL_BCM_BUFFER_DOWNLOAD

In this ioctl, we are testing to see if the lock is held.
If it is not held, that means this ioctl used incorrectly.
Therefore, we do not want to take the lock ourselves here.
Signed-off-by: NKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 77121d52
...@@ -796,6 +796,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -796,6 +796,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (!down_trylock(&Adapter->fw_download_sema)) { if (!down_trylock(&Adapter->fw_download_sema)) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
"Invalid way to download buffer. Use Start and then call this!!!\n"); "Invalid way to download buffer. Use Start and then call this!!!\n");
up(&Adapter->fw_download_sema);
Status = -EINVAL; Status = -EINVAL;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册