File tree Expand file tree Collapse file tree
arch/powerpc/platforms/pseries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ static const struct file_operations papr_hvpipe_handle_ops = {
480480static int papr_hvpipe_dev_create_handle (u32 srcID )
481481{
482482 struct hvpipe_source_info * src_info __free (kfree ) = NULL ;
483+ struct hvpipe_source_info * owned_src_info ;
483484
484485 spin_lock (& hvpipe_src_list_lock );
485486 /*
@@ -509,7 +510,7 @@ static int papr_hvpipe_dev_create_handle(u32 srcID)
509510 if (fdf .err )
510511 return fdf .err ;
511512
512- retain_and_null_ptr (src_info );
513+ owned_src_info = retain_and_null_ptr (src_info );
513514 spin_lock (& hvpipe_src_list_lock );
514515 /*
515516 * If two processes are executing ioctl() for the same
@@ -520,7 +521,7 @@ static int papr_hvpipe_dev_create_handle(u32 srcID)
520521 spin_unlock (& hvpipe_src_list_lock );
521522 return - EALREADY ;
522523 }
523- list_add (& src_info -> list , & hvpipe_src_list );
524+ list_add (& owned_src_info -> list , & hvpipe_src_list );
524525 spin_unlock (& hvpipe_src_list_lock );
525526 return fd_publish (fdf );
526527}
You can’t perform that action at this time.
0 commit comments