Skip to contentSkip to conversation

batostr() function

DISCUSSION Johannes Berg 7 participants 8 messages May 7, 2012 – May 8, 2012 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

#2 lore raw
In reply to a message not in the archive

Hi Johannes

Quoted 3 lines · Johannes Berg

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.

Quoted 1 line

johannes

Regards
David

#4 lore raw
In reply to a message not in the archive

Hi David,

Quoted 5 lines · David Herrmann

Hi Johannes

On Mon, May 7, 2012 at 1:49 PM, Johannes Berg <[email protected]> wrote:

Quoted 7 lines
Quoted 3 lines

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

#5 lore raw
In reply to David Herrmann
Quoted 10 lines · David Herrmann

Hi Johannes

Quoted 3 lines · Johannes Berg

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

#6 lore raw
Quoted 8 lines · Johannes Berg
Quoted 7 lines · David Herrmann

Hi Johannes

Quoted 3 lines · Johannes Berg

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 ...

Quoted 6 lines
Quoted 3 lines

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

#7 lore raw
Quoted 13 lines · Andrei Emeltchenko
Quoted 12 lines · Johannes Berg
Quoted 10 lines · David Herrmann

Hi Johannes

Quoted 3 lines · Johannes Berg

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.

Quoted 5 lines
Quoted 2 lines

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

#8 lore raw
Quoted 14 lines · Joe Perches
Quoted 13 lines · Andrei Emeltchenko
Quoted 12 lines · Johannes Berg
Quoted 10 lines · David Herrmann

Hi Johannes

Quoted 3 lines · Johannes Berg

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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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

#10 lore raw
In reply to a message not in the archive
Quoted 18 lines · Johannes Berg
Quoted 17 lines · Joe Perches
Quoted 16 lines · Andrei Emeltchenko
Quoted 14 lines · Johannes Berg
Quoted 10 lines · David Herrmann

Hi Johannes

Quoted 3 lines · Johannes Berg

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 ...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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