https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Mark Johnston changed:
What|Removed |Added
Status|New |Open
CC|
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #17 from Andrew Reiter ---
Created attachment 208185
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208185&action=edit
Final (?) source diff with a couple cases added that were missed by coccinelle
Final (?) source d
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Andrew Reiter changed:
What|Removed |Added
Version|12.0-RELEASE|CURRENT
--
You are receiving this
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #16 from Andrew Reiter ---
(In reply to Andrew Reiter from comment #15)
IOW, I think the last diff attached may be worth going forward with.
--
You are receiving this mail because:
You are the assignee for the bug.
___
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #15 from Andrew Reiter ---
Created attachment 208169
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208169&action=edit
updated patch with better coverage
Ok, so the cocci 2 script seems to generate some FP cases that
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #14 from Conrad Meyer ---
(In reply to Andrew Reiter from comment #11)
> Thanks for the comments. I am attaching a new version (titled "cocci 2" in the
> attachments list) that simplifies some things.
Thanks!
> It probably cou
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #13 from Andrew Reiter ---
(In reply to Andrew Reiter from comment #12)
And this version runs in a reasonable amount of time :-P
--
You are receiving this mail because:
You are the assignee for the bug.
___
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Andrew Reiter changed:
What|Removed |Added
Attachment #208157|text/x-csrc |text/plain
mime type|
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #11 from Andrew Reiter ---
(In reply to Conrad Meyer from comment #10)
Thanks for the comments. I am attaching a new version (titled "cocci 2" in the
attachments list) that simplifies some things. It probably could be a lot
bett
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #10 from Conrad Meyer ---
Also, I think the patch could be simplified quite a bit if we can nest the
conditional matching (i.e., result cast to type or not; position of M_WAITOK in
flags; even allocation function (not sure the n
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #9 from Andrew Reiter ---
(In reply to Conrad Meyer from comment #8)
Ahh, really good point; thank you for bringing that up. I will look into this.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #8 from Conrad Meyer ---
There's some way of declaring that a coccinelle variable ('buf') hasn't been
reassigned since the earlier malloc call, although I don't recall how to do it.
E.g., in this code,
buf = malloc(M_WAITOK)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #7 from Andrew Reiter ---
Created attachment 208142
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208142&action=edit
Coccinelle patch that generates a unified diff for this
Still need to look through / basic test th
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #6 from Andrew Reiter ---
Brief update: I have worked up a Coccinelle semantic patch for this, finally. I
am going to do local testing and then push it here.
--
You are receiving this mail because:
You are the assignee for the
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #5 from Andrew Reiter ---
Comment for posterity: the pass used to find the ones in patch:
https://github.com/roachspray/mwaitok-unneeded-rv-check
--
You are receiving this mail because:
You are the assignee for the bug.
__
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Mark Linimon changed:
What|Removed |Added
Keywords||patch
--
You are receiving this ma
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #4 from Conrad Meyer ---
Yes, I've used it, pfg@ has used it some, and I believe mjg@ has as well
(https://reviews.freebsd.org/D21427).
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #3 from Andrew Reiter ---
(In reply to Conrad Meyer from comment #2)
No I have not used that tool before, but it looks handy. Is there any history
of it being used in any FreeBSD processes before? Thanks for the pointer!
--
Yo
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Conrad Meyer changed:
What|Removed |Added
CC||c...@freebsd.org
--- Comment #2 fro
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #1 from Conrad Meyer ---
It is definitely ok for malloc, mallocarray, and realloc. (We have a kernel
reallocf? Huh.) Honestly, reallocf with M_WAITOK seems like a mistake — those
could instead/additionally be replaced with ju
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Bug ID: 240545
Summary: patch to remove unneeded M_WAITOK return value checks
Product: Base System
Version: 12.0-RELEASE
Hardware: Any
OS: Any
Status: New
21 matches
Mail list logo