Skip to contentSkip to conversation

devtmpfs [censored] oddities

DISCUSSION Al Viro 2 participants 4 messages Dec 16, 2009 – Dec 17, 2009

lore
Share & tools
lore

Al Viro

author
#0 lore raw

May I respectfully suggest that a blocking operation (such as
kstrdup with GFP_KERNEL, or grabbing a mutex, or, say it, pathname resolution) is not quite the thing to do while holding an rwlock?

As it is, any device_add() is an embarrassingly obvious deadlock
waiting to happen...

#1 lore raw
Quoted 6 lines · Al Viro

May I respectfully suggest that a blocking operation (such as
kstrdup with GFP_KERNEL, or grabbing a mutex, or, say it, pathname resolution) is not quite the thing to do while holding an rwlock?

As it is, any device_add() is an embarrassingly obvious deadlock
waiting to happen...

Thomas has posted a patch to fix this now.

Sorry for not catching it sooner, we should just delete the rwlocks so no one tries to ever use it again.

thanks,

greg k-h

author
#2 lore raw
Quoted 5 lines · Greg KH
Quoted 4 lines · Al Viro

May I respectfully suggest that a blocking operation (such as
kstrdup with GFP_KERNEL, or grabbing a mutex, or, say it, pathname resolution) is not quite the thing to do while holding an rwlock?

Quoted 7 lines
Quoted 2 lines

As it is, any device_add() is an embarrassingly obvious deadlock
waiting to happen...

Thomas has posted a patch to fix this now.

Sorry for not catching it sooner, we should just delete the rwlocks so no one tries to ever use it again.

Say again? Why would we delete rwlocks?

Signature · 2 lines
If you stare into drivers/staging long enough, drivers/staging stares back at
you...
#3 lore raw
Quoted 9 lines · Al Viro
Quoted 8 lines · Greg KH
Quoted 6 lines · Al Viro

May I respectfully suggest that a blocking operation (such as
kstrdup with GFP_KERNEL, or grabbing a mutex, or, say it, pathname resolution) is not quite the thing to do while holding an rwlock?

As it is, any device_add() is an embarrassingly obvious deadlock
waiting to happen...

Quoted 6 lines
Quoted 4 lines

Thomas has posted a patch to fix this now.

Sorry for not catching it sooner, we should just delete the rwlocks so no one tries to ever use it again.

Say again? Why would we delete rwlocks?

Sorry, no _new_ use of rwlocks should be added, generally they are used incorrectly, like this one was.

thanks,

greg k-h