Comments (4)
@tatokis : Your report may imply that removing urbr does not guarantee mutual exclusion and incur memory corruption. If list related fields of urbr are NULL, the memory has been already broken. So I greatly appreciate your patch but it seems to be not needed in normal case.
One of unpleasant things is fixed out queue length in userspace forward routine. 😢 Anyway, your application manage to work by increasing OUT_Q_LEN.
https://github.com/cezuni/usbip-win/blob/94b35a0916962874f062076176ec597a612aaa77/userspace/lib/usbip_forward.c#L251
from usbip-win.
I will definitely try that, thank you. That said, it still shouldn't trigger a bluescreen, and it doesn't seem to happen without that commit.
That aside, this sounds more like a "double free" issue (RemoveEntryList getting called twice on the same pointer), rather than memory corruption.
I believe if there was corruption, the fields wouldn't be null, but some random values, and there would also possibly be corruption that wouldn't let me view the struct fields inside WinDbg.
from usbip-win.
@tatokis : After inspecting a code, list_state NULL case was found. So list_state should be initialized when urbr is created. Could you try with the following diff?
diff --git a/driver/vhci/usbreq.c b/driver/vhci/usbreq.c
index db5bb0c..508f187 100644
--- a/driver/vhci/usbreq.c
+++ b/driver/vhci/usbreq.c
@@ -161,6 +161,7 @@ create_urbr(pusbip_vpdo_dev_t vpdo, PIRP irp, unsigned long seq_num_unlink)
urbr->vpdo = vpdo;
urbr->irp = irp;
urbr->seq_num_unlink = seq_num_unlink;
+ InitializeListHead(&urbr->list_state);
return urbr;
}
from usbip-win.
That fixes the issue, and the system no longer crashes on unlink. Thank you :)
from usbip-win.
Related Issues (20)
- About debug in VS2019
- USB microphone does not work (does not transmit a signal). USB flash works
- Attaching remote device by VID rather than BUS ID HOT 6
- is it possible to use usbip inside a remote desktop session together with a wacom tablet?
- failed to attach, code:-6 HOT 1
- usbip:error:attacher.exe not found
- Device shows up on client, but stops working after attached HOT 1
- Xbox Wireless Adapter for Windows Attaches but unable to associate controller HOT 11
- python hid.py usbip.py
- Driver signing / Microsoft
- Merge in upstream?
- Confused about the notes on release usbip-win 0.3.6-dev HOT 1
- Unable to Bind More Than 12 USB Devices Using USB IP Solution
- Device from Linux server on Windows client disconnects after 3 seconds
- USBIP error on attach with: usbip: error: failed to attach on client and usbipd: info: request 0x8003(5): failed on server
- Camera issues HOT 3
- Device is "Unstably bound"
- UDE Driver conflicts with Parsec's Virtual USB device driver
- swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 4 (slots)
- connected device is not realy connected (W11 / 24H2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usbip-win.