aio_pthread - smb_panic

Nir Drang nir at
Wed Jan 25 06:36:05 MST 2012

when closing in in progress large file write IO we got smb_panic.
looks like a simple fix in the talloc_array return value.
should be if(!pjobid).

static void aio_pthread_handle_suspend_completion(struct event_context
struct fd_event *event,
uint16 flags,
void *p)
struct suspend_private *sp = (struct suspend_private *)p;
struct aio_private_data *pd = NULL;
struct tevent_immediate *im = NULL;
int *pjobid = NULL;
int i;

DEBUG(10, ("aio_pthread_handle_suspend_completion called with flags=%d\n",

if ((flags & EVENT_FD_READ) == 0) {

pjobid = talloc_array(NULL, int, 1);
if (pjobid) {
smb_panic("aio_pthread_handle_suspend_completion: no memory.");

More information about the samba-technical mailing list