[PATCH 1/8] coresight: ultrasoc-smb: Fix resource leak in .remove()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Nov 9 05:11:11 PST 2023


On Thu, Nov 09, 2023 at 08:14:34PM +0800, hejunhao wrote:
> 
> On 2023/11/9 17:53, Uwe Kleine-König wrote:
> > Hello,
> > 
> > On Thu, Nov 09, 2023 at 05:41:55PM +0800, hejunhao wrote:
> > > On 2023/11/8 4:28, Uwe Kleine-König wrote:
> > > > If smb_config_inport() fails it's still necessary to unregister all
> > > > resources. As smb_config_inport() already emits an error message on
> > > > failure, there is no need to add another one. By not returning the error
> > > > code, a second error message (about the return value being ignored) is
> > > > suppressed.
> > > > 
> > > > Fixes: 06f5c2926aaa ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> > > thanks, for the report. Can you try this patch and help review it?
> > > 
> > > https://lore.kernel.org/linux-arm-kernel/20231021083822.18239-3-hejunhao3@huawei.com/
> > Well, I cannot try it, but it improves things a bit. The remaining
> > problem is that smb_remove() should return 0 even if smb_config_inport()
> > fails.
> > 
> > Best regards
> > Uwe
> 
> Yes, I will do that.
> By the way, Can I add patch 8.8 to my patchset? I think this is a good way
> to resolve patch conflicts.

I don't know how patch application works in drivers/hwtracing. I will
probably check if these patches are in next in a few weeks and resend if
they are not. If you adding patch #8 to your patch set needs more
coordination, please tell me.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231109/5f7fb3eb/attachment-0001.sig>


More information about the linux-arm-kernel mailing list