misc: uidstat: avoid create_stat() race and blockage.
authorJP Abgrall <jpa@google.com>
Thu, 30 May 2013 22:31:17 +0000 (15:31 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 21:16:26 +0000 (14:16 -0700)
commit760017d10ac80defe7fa9ad12aebf36ced5f3119
tree17a15c195f77be07f6d9593b9ef1131439bda924
parent22dc2e1ba253973e40e35025cf08005e2af9e3cb
misc: uidstat: avoid create_stat() race and blockage.

* create_stat() race would lead to:
  [   58.132324] proc_dir_entry 'uid_stat/10061' already registered

* blocking kmalloc reported by sbranden
 tcp_read_sock()
  uid_stat_tcp_rcv()
    create_stat()
      kmalloc(GFP_KERNEL)

Signed-off-by: JP Abgrall <jpa@google.com>
drivers/misc/uid_stat.c