Re: [PATCH 1/1] bsg-lib: fix use-after-free under memory-pressure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  	if (!q)
>  		return ERR_PTR(-ENOMEM);
>  	q->cmd_size = sizeof(struct bsg_job) + dd_job_size;
> -	q->init_rq_fn = bsg_init_rq;
> -	q->exit_rq_fn = bsg_exit_rq;
> +	q->init_rq_fn = bsg_init_job;
> +	q->exit_rq_fn = bsg_exit_job;
> +	q->initialize_rq_fn = bsg_init_rq;

Please use function names that match the method names, that is keep
the existing names and name the new helper bsg_initialize_rq;

Except for that the patch looks fine to me:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]