Actions
Bug #6258
closedeventfd problem with NULL pointer constant and ints
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-09-22
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
commit f75919702c1c9106d3c079c5ff53d79045ef2653 Author: Richard PALO <richard@NetBSD.org> Date: Sun Sep 13 09:49:56 2015 +0200 fix NULL/int use in eventfd.c diff --git a/usr/src/uts/common/io/eventfd.c b/usr/src/uts/common/io/eventfd.c index e5082b4..5497f60 100644 --- a/usr/src/uts/common/io/eventfd.c +++ b/usr/src/uts/common/io/eventfd.c @@ -68,7 +68,7 @@ eventfd_open(dev_t *devp, int flag, int otyp, cred_t *cred_p) if (ddi_soft_state_zalloc(eventfd_softstate, minor) != DDI_SUCCESS) { vmem_free(eventfd_minor, (void *)(uintptr_t)minor, 1); mutex_exit(&eventfd_lock); - return (NULL); + return (0); } state = ddi_get_soft_state(eventfd_softstate, minor); @@ -293,7 +293,7 @@ eventfd_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) } if (ddi_create_minor_node(devi, "eventfd", S_IFCHR, - EVENTFDMNRN_EVENTFD, DDI_PSEUDO, NULL) == DDI_FAILURE) { + EVENTFDMNRN_EVENTFD, DDI_PSEUDO, 0) == DDI_FAILURE) { cmn_err(CE_NOTE, "/dev/eventfd couldn't create minor node"); ddi_soft_state_fini(&eventfd_softstate); mutex_exit(&eventfd_lock);
Related issues
Updated by Toomas Soome over 1 year ago
- Related to Bug #10436: eventfd: NULL pointer errors added
Updated by Toomas Soome over 1 year ago
- Related to Feature #12661: null.h: enable NULL pointer for SPARC added
Actions