Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154291040
D32075.id95550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
859 B
Referenced Files
None
Subscribers
None
D32075.id95550.diff
View Options
Index: sys/dev/sdhci/sdhci.c
===================================================================
--- sys/dev/sdhci/sdhci.c
+++ sys/dev/sdhci/sdhci.c
@@ -264,7 +264,11 @@
{
struct sbuf s;
- sbuf_new(&s, NULL, 1024, SBUF_AUTOEXTEND);
+ if (sbuf_new(&s, NULL, 1024, SBUF_NOWAIT | SBUF_AUTOEXTEND) == NULL) {
+ slot_printf(slot, "sdhci_dumpregs: Failed to allocate memory for sbuf\n");
+ return;
+ }
+
sbuf_set_drain(&s, &sbuf_printf_drain, NULL);
sdhci_dumpregs_buf(slot, &s);
sbuf_finish(&s);
@@ -340,7 +344,11 @@
{
struct sbuf s;
- sbuf_new(&s, NULL, 1024, SBUF_AUTOEXTEND);
+ if (sbuf_new(&s, NULL, 1024, SBUF_NOWAIT | SBUF_AUTOEXTEND) == NULL) {
+ slot_printf(slot, "sdhci_dumpcaps: Failed to allocate memory for sbuf\n");
+ return;
+ }
+
sbuf_set_drain(&s, &sbuf_printf_drain, NULL);
sdhci_dumpcaps_buf(slot, &s);
sbuf_finish(&s);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 3:43 PM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32288846
Default Alt Text
D32075.id95550.diff (859 B)
Attached To
Mode
D32075: sdhci: Fix crash caused by M_WAITOK in sdhci dumps
Attached
Detach File
Event Timeline
Log In to Comment