Re: [PATCH] attrib-server: Fix multiple channels detaching mix-up

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

 



Hi Ido,

On Thu, Jun 07, 2012, Johan Hedberg wrote:
> Hi Ido,
> 
> On Wed, Jun 06, 2012, Ido Yariv wrote:
> > On Wed, May 30, 2012 at 09:32:27PM +0300, Ido Yariv wrote:
> > > From 78254bb099f80ad38e10075fbb73a4d990217630 Mon Sep 17 00:00:00 2001
> > > From: Ido Yariv <ido@xxxxxxxxxx>
> > > Date: Tue, 29 May 2012 21:11:16 +0300
> > > Subject: [PATCH v2] attrib-server: Fix multiple channels detaching mix-up
> > > 
> > > The identifier returned by g_attrib_register is not unique across
> > > different channels. Since attrib_channel_detach assumes this identifier
> > > to be unique, it may end up detaching the wrong channel when a device
> > > disconnects.
> > > 
> > > Fix this by using the channel's pointer as a unique identifier for
> > > detaching the channel. The identifier returned from g_attrib_register
> > > will still be used to find the relevant event structure.
> > 
> > Any thoughts about this one?
> 
> I don't really like the idea of returning a pointer (even though an
> opaque one) to code that shouldn't have access to data behind that
> pointer. Could we instead just make this really simple by removing
> attrib->next_evt_id and adding a static guint variable into the
> g_attrib_register function?

Since I haven't heard back from you and we're way overdue with the 4.100
release I went ahead and pushed this simplified solution.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux