misc: uidstat: avoid create_stat() race and blockage.
authorJP Abgrall <jpa@google.com>
Thu, 30 May 2013 22:31:17 +0000 (15:31 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:30 +0000 (13:53 -0800)
commitf7a812174033fe620509e6e8ca7022abd924b1c4
tree3ecdd3a9005b474d4c86d1bc8bc7df7f1d991b63
parent2665ab98e7ae58a197fb455269b23f84ca5675b8
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