Re: [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command

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

 



On Mon, Jul 17, 2017 at 04:17:09PM -0400, David Kershner wrote:
> +	mapping = memremap(addr, bytes, MEMREMAP_WB);
> +	if (!mapping)
> +		goto err_finish_ctx;

This goto is wrong.  It calls parser_done(ctx) when it should just call
kfree(ctx).  The difference is that parser_done() looks like this:

   289  static void parser_done(struct parser_context *ctx)
   290  {
   291          chipset_dev->controlvm_payload_bytes_buffered -= ctx->param_bytes;
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We never incremented this so we shouldn't be decrementing it.

   292          kfree(ctx);
   293  }


regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux