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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel