Skip to contentSkip to conversation

apparmor: double lock

DISCUSSION Jiri Slaby 3 participants 4 messages Sep 4, 2010 – Sep 6, 2010

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

Hi,

stanse found that you possibly double lock ns->lock:
aa_remove_profiles
-> write_lock(&ns->lock)
-> __remove_namespace(ns)

    -> destroy_namespace(ns)
      -> write_lock(&ns->lock)

Could you fix that if that may happen at all?

regards,

Signature · 1 line
js
#1 lore raw
Quoted 11 lines · Jiri Slaby

Hi,

stanse found that you possibly double lock ns->lock:
aa_remove_profiles
-> write_lock(&ns->lock)
-> __remove_namespace(ns)

    -> destroy_namespace(ns)
      -> write_lock(&ns->lock)

Could you fix that if that may happen at all?

Yes, thanks Jiri, the patch has already been posted

http://marc.info/?l=linux-kernel&m=128295924407596&w=2

john

#2 lore raw
Quoted 10 lines · John Johansen
Quoted 9 lines · Jiri Slaby

Hi,

stanse found that you possibly double lock ns->lock:
aa_remove_profiles
-> write_lock(&ns->lock)
-> __remove_namespace(ns)

    -> destroy_namespace(ns)
      -> write_lock(&ns->lock)
Quoted 5 lines
Quoted 2 lines

Could you fix that if that may happen at all?

Yes, thanks Jiri, the patch has already been posted

http://marc.info/?l=linux-kernel&m=128295924407596&w=2

Are all of the patches in that set ready to be merged to Linus?

Signature · 2 lines
James Morris
<[email protected]>
#3 lore raw
Quoted 12 lines · James Morris
Quoted 10 lines · John Johansen
Quoted 9 lines · Jiri Slaby

Hi,

stanse found that you possibly double lock ns->lock:
aa_remove_profiles
-> write_lock(&ns->lock)
-> __remove_namespace(ns)

    -> destroy_namespace(ns)
      -> write_lock(&ns->lock)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Could you fix that if that may happen at all?

Yes, thanks Jiri, the patch has already been posted

http://marc.info/?l=linux-kernel&m=128295924407596&w=2

Are all of the patches in that set ready to be merged to Linus?

yes they should be now, I believe so.

I have just posted out the updated Fix security_task_setrlimit logic patch that fixes the commenting. I can repost the series if you would like.

thanks
john