aio_pthread - smb_panic

Jeremy Allison jra at samba.org
Wed Jan 25 13:40:20 MST 2012


On Wed, Jan 25, 2012 at 03:36:05PM +0200, Nir Drang wrote:
> Hi,
> 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).
> Nir.
> 
> static void aio_pthread_handle_suspend_completion(struct event_context
> *event_ctx,
> 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",
> (int)flags));
> 
> if ((flags & EVENT_FD_READ) == 0) {
> return;
> }
> 
> pjobid = talloc_array(NULL, int, 1);
> if (pjobid) {
> smb_panic("aio_pthread_handle_suspend_completion: no memory.");
> }

Great catch ! Thanks.

Sorry for the typo..

Jeremy.


More information about the samba-technical mailing list