* batostr() function @ 2012-05-07 11:49 Johannes Berg [not found] ` <1336391383.4325.24.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-05-07 11:49 UTC (permalink / raw) To: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev Really? 2 static buffers that are used alternately based on a static variable? How can that possibly be thread-safe? That may work in very restricted scenarios, but ... johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1336391383.4325.24.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>]
* Re: batostr() function [not found] ` <1336391383.4325.24.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> @ 2012-05-08 13:30 ` David Herrmann [not found] ` <CANq1E4QW4vSn_r9C=rirShE+-eyPjRX+b5tpC+mx69Hs6aEYqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-05-08 14:25 ` Johannes Berg 0 siblings, 2 replies; 8+ messages in thread From: David Herrmann @ 2012-05-08 13:30 UTC (permalink / raw) To: Johannes Berg; +Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev Hi Johannes On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote: > Really? 2 static buffers that are used alternately based on a static > variable? How can that possibly be thread-safe? That may work in very > restricted scenarios, but ... Looking at "git blame" it seems the whole function is still from linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing it, thanks. > johannes Regards David ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CANq1E4QW4vSn_r9C=rirShE+-eyPjRX+b5tpC+mx69Hs6aEYqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: batostr() function [not found] ` <CANq1E4QW4vSn_r9C=rirShE+-eyPjRX+b5tpC+mx69Hs6aEYqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-05-08 14:20 ` Ulisses Furquim 0 siblings, 0 replies; 8+ messages in thread From: Ulisses Furquim @ 2012-05-08 14:20 UTC (permalink / raw) To: David Herrmann Cc: Johannes Berg, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev Hi David, On Tue, May 8, 2012 at 10:30 AM, David Herrmann <dh.herrmann-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > Hi Johannes > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> > wrote: > > Really? 2 static buffers that are used alternately based on a static > > variable? How can that possibly be thread-safe? That may work in very > > restricted scenarios, but ... > > Looking at "git blame" it seems the whole function is still from > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing > it, thanks. Thanks for fixing it. I'm sure we haven't noticed but it's still weird to have it this way. :-/ Regards, -- Ulisses Furquim ProFUSION embedded systems http://profusion.mobi Mobile: +55 19 9250 0942 Skype: ulissesffs ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: batostr() function 2012-05-08 13:30 ` David Herrmann [not found] ` <CANq1E4QW4vSn_r9C=rirShE+-eyPjRX+b5tpC+mx69Hs6aEYqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-05-08 14:25 ` Johannes Berg 2012-05-08 14:30 ` Andrei Emeltchenko 1 sibling, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-05-08 14:25 UTC (permalink / raw) To: David Herrmann; +Cc: linux-bluetooth, netdev On Tue, 2012-05-08 at 15:30 +0200, David Herrmann wrote: > Hi Johannes > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > > Really? 2 static buffers that are used alternately based on a static > > variable? How can that possibly be thread-safe? That may work in very > > restricted scenarios, but ... > > Looking at "git blame" it seems the whole function is still from > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing > it, thanks. I was thinking you could use %pM, but it seems BT addresses are stored the wrong way around for some reason ... johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: batostr() function 2012-05-08 14:25 ` Johannes Berg @ 2012-05-08 14:30 ` Andrei Emeltchenko 2012-05-08 17:18 ` Joe Perches 0 siblings, 1 reply; 8+ messages in thread From: Andrei Emeltchenko @ 2012-05-08 14:30 UTC (permalink / raw) To: Johannes Berg; +Cc: David Herrmann, linux-bluetooth, netdev On Tue, May 08, 2012 at 04:25:08PM +0200, Johannes Berg wrote: > On Tue, 2012-05-08 at 15:30 +0200, David Herrmann wrote: > > Hi Johannes > > > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > > > Really? 2 static buffers that are used alternately based on a static > > > variable? How can that possibly be thread-safe? That may work in very > > > restricted scenarios, but ... > > > > Looking at "git blame" it seems the whole function is still from > > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing > > it, thanks. > > I was thinking you could use %pM, but it seems BT addresses are stored > the wrong way around for some reason ... This looks like better idea then allocating buffers, we can use swap to take care about "wrong order". Best regards Andrei Emeltchenko ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: batostr() function 2012-05-08 14:30 ` Andrei Emeltchenko @ 2012-05-08 17:18 ` Joe Perches 2012-05-08 17:48 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Joe Perches @ 2012-05-08 17:18 UTC (permalink / raw) To: Andrei Emeltchenko Cc: Johannes Berg, David Herrmann, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev On Tue, 2012-05-08 at 17:30 +0300, Andrei Emeltchenko wrote: > On Tue, May 08, 2012 at 04:25:08PM +0200, Johannes Berg wrote: > > On Tue, 2012-05-08 at 15:30 +0200, David Herrmann wrote: > > > Hi Johannes > > > > > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote: > > > > Really? 2 static buffers that are used alternately based on a static > > > > variable? How can that possibly be thread-safe? That may work in very > > > > restricted scenarios, but ... > > > > > > Looking at "git blame" it seems the whole function is still from > > > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing > > > it, thanks. > > > > I was thinking you could use %pM, but it seems BT addresses are stored > > the wrong way around for some reason ... > > This looks like better idea then allocating buffers, we can use swap to > take care about "wrong order". https://lkml.org/lkml/2010/12/3/358 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: batostr() function 2012-05-08 17:18 ` Joe Perches @ 2012-05-08 17:48 ` Johannes Berg [not found] ` <1336499313.4320.4.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-05-08 17:48 UTC (permalink / raw) To: Joe Perches Cc: Andrei Emeltchenko, David Herrmann, linux-bluetooth, netdev, Luis R. Rodriguez On Tue, 2012-05-08 at 10:18 -0700, Joe Perches wrote: > On Tue, 2012-05-08 at 17:30 +0300, Andrei Emeltchenko wrote: > > On Tue, May 08, 2012 at 04:25:08PM +0200, Johannes Berg wrote: > > > On Tue, 2012-05-08 at 15:30 +0200, David Herrmann wrote: > > > > Hi Johannes > > > > > > > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > > > > > Really? 2 static buffers that are used alternately based on a static > > > > > variable? How can that possibly be thread-safe? That may work in very > > > > > restricted scenarios, but ... > > > > > > > > Looking at "git blame" it seems the whole function is still from > > > > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing > > > > it, thanks. > > > > > > I was thinking you could use %pM, but it seems BT addresses are stored > > > the wrong way around for some reason ... > > > > This looks like better idea then allocating buffers, we can use swap to > > take care about "wrong order". > > https://lkml.org/lkml/2010/12/3/358 Pretty much what I had in mind, thanks. Luis, you'll notice that this will be a pain to backport in compat. :-) johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1336499313.4320.4.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>]
* Re: batostr() function [not found] ` <1336499313.4320.4.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> @ 2012-05-08 18:26 ` Luis R. Rodriguez 0 siblings, 0 replies; 8+ messages in thread From: Luis R. Rodriguez @ 2012-05-08 18:26 UTC (permalink / raw) To: Johannes Berg Cc: Joe Perches, Andrei Emeltchenko, David Herrmann, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev On Tue, May 8, 2012 at 10:48 AM, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote: > On Tue, 2012-05-08 at 10:18 -0700, Joe Perches wrote: >> On Tue, 2012-05-08 at 17:30 +0300, Andrei Emeltchenko wrote: >> > On Tue, May 08, 2012 at 04:25:08PM +0200, Johannes Berg wrote: >> > > On Tue, 2012-05-08 at 15:30 +0200, David Herrmann wrote: >> > > > Hi Johannes >> > > > >> > > > On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote: >> > > > > Really? 2 static buffers that are used alternately based on a static >> > > > > variable? How can that possibly be thread-safe? That may work in very >> > > > > restricted scenarios, but ... >> > > > >> > > > Looking at "git blame" it seems the whole function is still from >> > > > linux-2.4. Looks like no-one ever noticed. I've sent a patchset fixing >> > > > it, thanks. >> > > >> > > I was thinking you could use %pM, but it seems BT addresses are stored >> > > the wrong way around for some reason ... >> > >> > This looks like better idea then allocating buffers, we can use swap to >> > take care about "wrong order". >> >> https://lkml.org/lkml/2010/12/3/358 > > Pretty much what I had in mind, thanks. Luis, you'll notice that this > will be a pain to backport in compat. :-) Mumble grumble. Oh well! :) I'm starting to enjoy the curve balls. Luis ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-08 18:26 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-07 11:49 batostr() function Johannes Berg [not found] ` <1336391383.4325.24.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> 2012-05-08 13:30 ` David Herrmann [not found] ` <CANq1E4QW4vSn_r9C=rirShE+-eyPjRX+b5tpC+mx69Hs6aEYqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-05-08 14:20 ` Ulisses Furquim 2012-05-08 14:25 ` Johannes Berg 2012-05-08 14:30 ` Andrei Emeltchenko 2012-05-08 17:18 ` Joe Perches 2012-05-08 17:48 ` Johannes Berg [not found] ` <1336499313.4320.4.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org> 2012-05-08 18:26 ` Luis R. Rodriguez
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).