archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <>
To: Dan Carpenter <>
Cc: Greg Kroah-Hartman <>,
	Andreas Werner <>,,
Subject: Re: [PATCH] mcb: fix error handling in mcb_alloc_bus()
Date: Tue, 1 Jun 2021 15:23:55 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <YLX7bAD4UPCpIBmq@mwanda>

Am 01.06.21 um 11:18 schrieb Dan Carpenter:
> There are two bugs:
> 1) If ida_simple_get() fails then this code calls put_device(carrier)
>    but we haven't yet called get_device(carrier) and probably that
>    leads to a use after free.
> 2) After device_initialize() then we need to use put_device() to
>    release the bus.  This will free the internal resources tied to the
>    device and call mcb_free_bus() which will free the rest.
> Fixes: 5d9e2ab9fea4 ("mcb: Implement bus->dev.release callback")
> Fixes: 18d288198099 ("mcb: Correctly initialize the bus's device")
> Signed-off-by: Dan Carpenter <>

Thanks applied

  reply	other threads:[~2021-06-01 13:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  9:18 Dan Carpenter
2021-06-01 13:23 ` Johannes Thumshirn [this message]
2021-08-06 13:32   ` Dan Carpenter
2021-08-06 13:37     ` Dan Carpenter
2021-08-30 14:08   ` Dan Carpenter
2021-08-30 16:06     ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] mcb: fix error handling in mcb_alloc_bus()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).