[staging:staging-next 115/274] drivers/staging/ced1401/usb1401.c:1065 Handle1401Esc() error: double unlock 'spin_lock:&pdx->stagedLock'
Fengguang Wu
fengguang.wu at intel.com
Sun Oct 7 11:07:02 UTC 2012
Hi Alois,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
head: e1878957b4676a17cf398f7f5723b365e9a2ca48
commit: 2eae6bdc12f4e49b7f94f032b82d664dcf3881bc [115/274] Staging: add ced1401 USB driver
drivers/staging/ced1401/usb1401.c:505 CopyUserSpace() warn: statement has no effect 3
+ drivers/staging/ced1401/usb1401.c:1065 Handle1401Esc() error: double unlock 'spin_lock:&pdx->stagedLock'
--
drivers/staging/ced1401/ced_ioc.c:830 WaitEvent() warn: buffer overflow 'pdx->rTransDef' 8 <= 8
+ drivers/staging/ced1401/ced_ioc.c:855 WaitEvent() warn: inconsistent returns mutex:&pdx->io_mutex: locked (839) unlocked (826,855)
drivers/staging/ced1401/ced_ioc.c:871 TestEvent() warn: buffer overflow 'pdx->rTransDef' 8 <= 8
+ drivers/staging/ced1401/ced_ioc.c:898 GetTransfer() warn: 'tx' puts 3104 bytes on stack
+ drivers/staging/ced1401/ced_ioc.c:906 GetTransfer() warn: check that 'tx.seg' doesn't leak information
+ drivers/staging/ced1401/ced_ioc.c:1057 CheckSelfTest() warn: check that 'gst.code' doesn't leak information
vim +1065 drivers/staging/ced1401/usb1401.c
2eae6bdc Alois Schlögl 2012-09-17 1049 }
2eae6bdc Alois Schlögl 2012-09-17 1050 else
2eae6bdc Alois Schlögl 2012-09-17 1051 {
2eae6bdc Alois Schlögl 2012-09-17 1052 if ((wTransType == TM_EXTTOHOST) || (wTransType == TM_EXTTO1401))
2eae6bdc Alois Schlögl 2012-09-17 1053 {
2eae6bdc Alois Schlögl 2012-09-17 1054 iReturn = ReadWriteMem(pdx, !pdx->rDMAInfo.bOutWard, pdx->rDMAInfo.wIdent, pdx->rDMAInfo.dwOffset, pdx->rDMAInfo.dwSize);
2eae6bdc Alois Schlögl 2012-09-17 1055 if (iReturn != U14ERR_NOERROR)
2eae6bdc Alois Schlögl 2012-09-17 1056 dev_err(&pdx->interface->dev, "%s ReadWriteMem() failed %d", __func__, iReturn);
2eae6bdc Alois Schlögl 2012-09-17 1057 }
2eae6bdc Alois Schlögl 2012-09-17 1058 else // This covers non-linear transfer setup
2eae6bdc Alois Schlögl 2012-09-17 1059 dev_err(&pdx->interface->dev, "%s Unknown block xfer type %d", __func__, wTransType);
2eae6bdc Alois Schlögl 2012-09-17 1060 }
2eae6bdc Alois Schlögl 2012-09-17 1061 }
2eae6bdc Alois Schlögl 2012-09-17 1062 else // Failed to read parameters
2eae6bdc Alois Schlögl 2012-09-17 1063 dev_err(&pdx->interface->dev, "%s ReadDMAInfo() fail", __func__);
2eae6bdc Alois Schlögl 2012-09-17 1064
2eae6bdc Alois Schlögl 2012-09-17 @1065 spin_unlock(&pdx->stagedLock); // OK here
2eae6bdc Alois Schlögl 2012-09-17 1066 }
2eae6bdc Alois Schlögl 2012-09-17 1067
2eae6bdc Alois Schlögl 2012-09-17 1068 dev_dbg(&pdx->interface->dev, "%s returns %d", __func__, iReturn);
2eae6bdc Alois Schlögl 2012-09-17 1069
2eae6bdc Alois Schlögl 2012-09-17 1070 return iReturn;
2eae6bdc Alois Schlögl 2012-09-17 1071 }
2eae6bdc Alois Schlögl 2012-09-17 1072
2eae6bdc Alois Schlögl 2012-09-17 1073 /****************************************************************************
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ced_ioc.c
Type: text/x-csrc
Size: 58634 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20121007/f495b118/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb1401.c
Type: text/x-csrc
Size: 67900 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20121007/f495b118/attachment-0001.c>
More information about the devel
mailing list