Locking 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. The text below describes the locking rules for VFS-related methods.
  2. It is (believed to be) up-to-date. *Please*, if you change anything in
  3. prototypes or locking protocols - update this file. And update the relevant
  4. instances in the tree, don't leave that to maintainers of filesystems/devices/
  5. etc. At the very least, put the list of dubious cases in the end of this file.
  6. Don't turn it into log - maintainers of out-of-the-tree code are supposed to
  7. be able to use diff(1).
  8. Thing currently missing here: socket operations. Alexey?
  9. --------------------------- dentry_operations --------------------------
  10. prototypes:
  11. int (*d_revalidate)(struct dentry *, int);
  12. int (*d_hash) (struct dentry *, struct qstr *);
  13. int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
  14. int (*d_delete)(struct dentry *);
  15. void (*d_release)(struct dentry *);
  16. void (*d_iput)(struct dentry *, struct inode *);
  17. char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
  18. locking rules:
  19. none have BKL
  20. dcache_lock rename_lock ->d_lock may block
  21. d_revalidate: no no no yes
  22. d_hash no no no yes
  23. d_compare: no yes no no
  24. d_delete: yes no yes no
  25. d_release: no no no yes
  26. d_iput: no no no yes
  27. d_dname: no no no no
  28. --------------------------- inode_operations ---------------------------
  29. prototypes:
  30. int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
  31. struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid
  32. ata *);
  33. int (*link) (struct dentry *,struct inode *,struct dentry *);
  34. int (*unlink) (struct inode *,struct dentry *);
  35. int (*symlink) (struct inode *,struct dentry *,const char *);
  36. int (*mkdir) (struct inode *,struct dentry *,int);
  37. int (*rmdir) (struct inode *,struct dentry *);
  38. int (*mknod) (struct inode *,struct dentry *,int,dev_t);
  39. int (*rename) (struct inode *, struct dentry *,
  40. struct inode *, struct dentry *);
  41. int (*readlink) (struct dentry *, char __user *,int);
  42. int (*follow_link) (struct dentry *, struct nameidata *);
  43. void (*truncate) (struct inode *);
  44. int (*permission) (struct inode *, int, struct nameidata *);
  45. int (*setattr) (struct dentry *, struct iattr *);
  46. int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
  47. int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
  48. ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
  49. ssize_t (*listxattr) (struct dentry *, char *, size_t);
  50. int (*removexattr) (struct dentry *, const char *);
  51. locking rules:
  52. all may block, none have BKL
  53. i_mutex(inode)
  54. lookup: yes
  55. create: yes
  56. link: yes (both)
  57. mknod: yes
  58. symlink: yes
  59. mkdir: yes
  60. unlink: yes (both)
  61. rmdir: yes (both) (see below)
  62. rename: yes (all) (see below)
  63. readlink: no
  64. follow_link: no
  65. truncate: yes (see below)
  66. setattr: yes
  67. permission: no
  68. getattr: no
  69. setxattr: yes
  70. getxattr: no
  71. listxattr: no
  72. removexattr: yes
  73. Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
  74. victim.
  75. cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
  76. ->truncate() is never called directly - it's a callback, not a
  77. method. It's called by vmtruncate() - library function normally used by
  78. ->setattr(). Locking information above applies to that call (i.e. is
  79. inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been
  80. passed).
  81. See Documentation/filesystems/directory-locking for more detailed discussion
  82. of the locking scheme for directory operations.
  83. --------------------------- super_operations ---------------------------
  84. prototypes:
  85. struct inode *(*alloc_inode)(struct super_block *sb);
  86. void (*destroy_inode)(struct inode *);
  87. void (*read_inode) (struct inode *);
  88. void (*dirty_inode) (struct inode *);
  89. int (*write_inode) (struct inode *, int);
  90. void (*put_inode) (struct inode *);
  91. void (*drop_inode) (struct inode *);
  92. void (*delete_inode) (struct inode *);
  93. void (*put_super) (struct super_block *);
  94. void (*write_super) (struct super_block *);
  95. int (*sync_fs)(struct super_block *sb, int wait);
  96. void (*write_super_lockfs) (struct super_block *);
  97. void (*unlockfs) (struct super_block *);
  98. int (*statfs) (struct dentry *, struct kstatfs *);
  99. int (*remount_fs) (struct super_block *, int *, char *);
  100. void (*clear_inode) (struct inode *);
  101. void (*umount_begin) (struct super_block *);
  102. int (*show_options)(struct seq_file *, struct vfsmount *);
  103. ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
  104. ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
  105. locking rules:
  106. All may block.
  107. BKL s_lock s_umount
  108. alloc_inode: no no no
  109. destroy_inode: no
  110. read_inode: no (see below)
  111. dirty_inode: no (must not sleep)
  112. write_inode: no
  113. put_inode: no
  114. drop_inode: no !!!inode_lock!!!
  115. delete_inode: no
  116. put_super: yes yes no
  117. write_super: no yes read
  118. sync_fs: no no read
  119. write_super_lockfs: ?
  120. unlockfs: ?
  121. statfs: no no no
  122. remount_fs: yes yes maybe (see below)
  123. clear_inode: no
  124. umount_begin: yes no no
  125. show_options: no (vfsmount->sem)
  126. quota_read: no no no (see below)
  127. quota_write: no no no (see below)
  128. ->read_inode() is not a method - it's a callback used in iget().
  129. ->remount_fs() will have the s_umount lock if it's already mounted.
  130. When called from get_sb_single, it does NOT have the s_umount lock.
  131. ->quota_read() and ->quota_write() functions are both guaranteed to
  132. be the only ones operating on the quota file by the quota code (via
  133. dqio_sem) (unless an admin really wants to screw up something and
  134. writes to quota files with quotas on). For other details about locking
  135. see also dquot_operations section.
  136. --------------------------- file_system_type ---------------------------
  137. prototypes:
  138. int (*get_sb) (struct file_system_type *, int,
  139. const char *, void *, struct vfsmount *);
  140. void (*kill_sb) (struct super_block *);
  141. locking rules:
  142. may block BKL
  143. get_sb yes yes
  144. kill_sb yes yes
  145. ->get_sb() returns error or 0 with locked superblock attached to the vfsmount
  146. (exclusive on ->s_umount).
  147. ->kill_sb() takes a write-locked superblock, does all shutdown work on it,
  148. unlocks and drops the reference.
  149. --------------------------- address_space_operations --------------------------
  150. prototypes:
  151. int (*writepage)(struct page *page, struct writeback_control *wbc);
  152. int (*readpage)(struct file *, struct page *);
  153. int (*sync_page)(struct page *);
  154. int (*writepages)(struct address_space *, struct writeback_control *);
  155. int (*set_page_dirty)(struct page *page);
  156. int (*readpages)(struct file *filp, struct address_space *mapping,
  157. struct list_head *pages, unsigned nr_pages);
  158. int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
  159. int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
  160. sector_t (*bmap)(struct address_space *, sector_t);
  161. int (*invalidatepage) (struct page *, unsigned long);
  162. int (*releasepage) (struct page *, int);
  163. int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
  164. loff_t offset, unsigned long nr_segs);
  165. int (*launder_page) (struct page *);
  166. locking rules:
  167. All except set_page_dirty may block
  168. BKL PageLocked(page) i_sem
  169. writepage: no yes, unlocks (see below)
  170. readpage: no yes, unlocks
  171. sync_page: no maybe
  172. writepages: no
  173. set_page_dirty no no
  174. readpages: no
  175. prepare_write: no yes yes
  176. commit_write: no yes yes
  177. write_begin: no locks the page yes
  178. write_end: no yes, unlocks yes
  179. perform_write: no n/a yes
  180. bmap: yes
  181. invalidatepage: no yes
  182. releasepage: no yes
  183. direct_IO: no
  184. launder_page: no yes
  185. ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
  186. may be called from the request handler (/dev/loop).
  187. ->readpage() unlocks the page, either synchronously or via I/O
  188. completion.
  189. ->readpages() populates the pagecache with the passed pages and starts
  190. I/O against them. They come unlocked upon I/O completion.
  191. ->writepage() is used for two purposes: for "memory cleansing" and for
  192. "sync". These are quite different operations and the behaviour may differ
  193. depending upon the mode.
  194. If writepage is called for sync (wbc->sync_mode != WBC_SYNC_NONE) then
  195. it *must* start I/O against the page, even if that would involve
  196. blocking on in-progress I/O.
  197. If writepage is called for memory cleansing (sync_mode ==
  198. WBC_SYNC_NONE) then its role is to get as much writeout underway as
  199. possible. So writepage should try to avoid blocking against
  200. currently-in-progress I/O.
  201. If the filesystem is not called for "sync" and it determines that it
  202. would need to block against in-progress I/O to be able to start new I/O
  203. against the page the filesystem should redirty the page with
  204. redirty_page_for_writepage(), then unlock the page and return zero.
  205. This may also be done to avoid internal deadlocks, but rarely.
  206. If the filesystem is called for sync then it must wait on any
  207. in-progress I/O and then start new I/O.
  208. The filesystem should unlock the page synchronously, before returning to the
  209. caller, unless ->writepage() returns special WRITEPAGE_ACTIVATE
  210. value. WRITEPAGE_ACTIVATE means that page cannot really be written out
  211. currently, and VM should stop calling ->writepage() on this page for some
  212. time. VM does this by moving page to the head of the active list, hence the
  213. name.
  214. Unless the filesystem is going to redirty_page_for_writepage(), unlock the page
  215. and return zero, writepage *must* run set_page_writeback() against the page,
  216. followed by unlocking it. Once set_page_writeback() has been run against the
  217. page, write I/O can be submitted and the write I/O completion handler must run
  218. end_page_writeback() once the I/O is complete. If no I/O is submitted, the
  219. filesystem must run end_page_writeback() against the page before returning from
  220. writepage.
  221. That is: after 2.5.12, pages which are under writeout are *not* locked. Note,
  222. if the filesystem needs the page to be locked during writeout, that is ok, too,
  223. the page is allowed to be unlocked at any point in time between the calls to
  224. set_page_writeback() and end_page_writeback().
  225. Note, failure to run either redirty_page_for_writepage() or the combination of
  226. set_page_writeback()/end_page_writeback() on a page submitted to writepage
  227. will leave the page itself marked clean but it will be tagged as dirty in the
  228. radix tree. This incoherency can lead to all sorts of hard-to-debug problems
  229. in the filesystem like having dirty inodes at umount and losing written data.
  230. ->sync_page() locking rules are not well-defined - usually it is called
  231. with lock on page, but that is not guaranteed. Considering the currently
  232. existing instances of this method ->sync_page() itself doesn't look
  233. well-defined...
  234. ->writepages() is used for periodic writeback and for syscall-initiated
  235. sync operations. The address_space should start I/O against at least
  236. *nr_to_write pages. *nr_to_write must be decremented for each page which is
  237. written. The address_space implementation may write more (or less) pages
  238. than *nr_to_write asks for, but it should try to be reasonably close. If
  239. nr_to_write is NULL, all dirty pages must be written.
  240. writepages should _only_ write pages which are present on
  241. mapping->io_pages.
  242. ->set_page_dirty() is called from various places in the kernel
  243. when the target page is marked as needing writeback. It may be called
  244. under spinlock (it cannot block) and is sometimes called with the page
  245. not locked.
  246. ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some
  247. filesystems and by the swapper. The latter will eventually go away. All
  248. instances do not actually need the BKL. Please, keep it that way and don't
  249. breed new callers.
  250. ->invalidatepage() is called when the filesystem must attempt to drop
  251. some or all of the buffers from the page when it is being truncated. It
  252. returns zero on success. If ->invalidatepage is zero, the kernel uses
  253. block_invalidatepage() instead.
  254. ->releasepage() is called when the kernel is about to try to drop the
  255. buffers from the page in preparation for freeing it. It returns zero to
  256. indicate that the buffers are (or may be) freeable. If ->releasepage is zero,
  257. the kernel assumes that the fs has no private interest in the buffers.
  258. ->launder_page() may be called prior to releasing a page if
  259. it is still found to be dirty. It returns zero if the page was successfully
  260. cleaned, or an error value if not. Note that in order to prevent the page
  261. getting mapped back in and redirtied, it needs to be kept locked
  262. across the entire operation.
  263. Note: currently almost all instances of address_space methods are
  264. using BKL for internal serialization and that's one of the worst sources
  265. of contention. Normally they are calling library functions (in fs/buffer.c)
  266. and pass foo_get_block() as a callback (on local block-based filesystems,
  267. indeed). BKL is not needed for library stuff and is usually taken by
  268. foo_get_block(). It's an overkill, since block bitmaps can be protected by
  269. internal fs locking and real critical areas are much smaller than the areas
  270. filesystems protect now.
  271. ----------------------- file_lock_operations ------------------------------
  272. prototypes:
  273. void (*fl_insert)(struct file_lock *); /* lock insertion callback */
  274. void (*fl_remove)(struct file_lock *); /* lock removal callback */
  275. void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
  276. void (*fl_release_private)(struct file_lock *);
  277. locking rules:
  278. BKL may block
  279. fl_insert: yes no
  280. fl_remove: yes no
  281. fl_copy_lock: yes no
  282. fl_release_private: yes yes
  283. ----------------------- lock_manager_operations ---------------------------
  284. prototypes:
  285. int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
  286. void (*fl_notify)(struct file_lock *); /* unblock callback */
  287. void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
  288. void (*fl_release_private)(struct file_lock *);
  289. void (*fl_break)(struct file_lock *); /* break_lease callback */
  290. locking rules:
  291. BKL may block
  292. fl_compare_owner: yes no
  293. fl_notify: yes no
  294. fl_copy_lock: yes no
  295. fl_release_private: yes yes
  296. fl_break: yes no
  297. Currently only NFSD and NLM provide instances of this class. None of the
  298. them block. If you have out-of-tree instances - please, show up. Locking
  299. in that area will change.
  300. --------------------------- buffer_head -----------------------------------
  301. prototypes:
  302. void (*b_end_io)(struct buffer_head *bh, int uptodate);
  303. locking rules:
  304. called from interrupts. In other words, extreme care is needed here.
  305. bh is locked, but that's all warranties we have here. Currently only RAID1,
  306. highmem, fs/buffer.c, and fs/ntfs/aops.c are providing these. Block devices
  307. call this method upon the IO completion.
  308. --------------------------- block_device_operations -----------------------
  309. prototypes:
  310. int (*open) (struct inode *, struct file *);
  311. int (*release) (struct inode *, struct file *);
  312. int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
  313. int (*media_changed) (struct gendisk *);
  314. int (*revalidate_disk) (struct gendisk *);
  315. locking rules:
  316. BKL bd_sem
  317. open: yes yes
  318. release: yes yes
  319. ioctl: yes no
  320. media_changed: no no
  321. revalidate_disk: no no
  322. The last two are called only from check_disk_change().
  323. --------------------------- file_operations -------------------------------
  324. prototypes:
  325. loff_t (*llseek) (struct file *, loff_t, int);
  326. ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
  327. ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
  328. ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
  329. ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
  330. int (*readdir) (struct file *, void *, filldir_t);
  331. unsigned int (*poll) (struct file *, struct poll_table_struct *);
  332. int (*ioctl) (struct inode *, struct file *, unsigned int,
  333. unsigned long);
  334. long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
  335. long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
  336. int (*mmap) (struct file *, struct vm_area_struct *);
  337. int (*open) (struct inode *, struct file *);
  338. int (*flush) (struct file *);
  339. int (*release) (struct inode *, struct file *);
  340. int (*fsync) (struct file *, struct dentry *, int datasync);
  341. int (*aio_fsync) (struct kiocb *, int datasync);
  342. int (*fasync) (int, struct file *, int);
  343. int (*lock) (struct file *, int, struct file_lock *);
  344. ssize_t (*readv) (struct file *, const struct iovec *, unsigned long,
  345. loff_t *);
  346. ssize_t (*writev) (struct file *, const struct iovec *, unsigned long,
  347. loff_t *);
  348. ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t,
  349. void __user *);
  350. ssize_t (*sendpage) (struct file *, struct page *, int, size_t,
  351. loff_t *, int);
  352. unsigned long (*get_unmapped_area)(struct file *, unsigned long,
  353. unsigned long, unsigned long, unsigned long);
  354. int (*check_flags)(int);
  355. int (*dir_notify)(struct file *, unsigned long);
  356. };
  357. locking rules:
  358. All except ->poll() may block.
  359. BKL
  360. llseek: no (see below)
  361. read: no
  362. aio_read: no
  363. write: no
  364. aio_write: no
  365. readdir: no
  366. poll: no
  367. ioctl: yes (see below)
  368. unlocked_ioctl: no (see below)
  369. compat_ioctl: no
  370. mmap: no
  371. open: maybe (see below)
  372. flush: no
  373. release: no
  374. fsync: no (see below)
  375. aio_fsync: no
  376. fasync: yes (see below)
  377. lock: yes
  378. readv: no
  379. writev: no
  380. sendfile: no
  381. sendpage: no
  382. get_unmapped_area: no
  383. check_flags: no
  384. dir_notify: no
  385. ->llseek() locking has moved from llseek to the individual llseek
  386. implementations. If your fs is not using generic_file_llseek, you
  387. need to acquire and release the appropriate locks in your ->llseek().
  388. For many filesystems, it is probably safe to acquire the inode
  389. semaphore. Note some filesystems (i.e. remote ones) provide no
  390. protection for i_size so you will need to use the BKL.
  391. ->open() locking is in-transit: big lock partially moved into the methods.
  392. The only exception is ->open() in the instances of file_operations that never
  393. end up in ->i_fop/->proc_fops, i.e. ones that belong to character devices
  394. (chrdev_open() takes lock before replacing ->f_op and calling the secondary
  395. method. As soon as we fix the handling of module reference counters all
  396. instances of ->open() will be called without the BKL.
  397. Note: ext2_release() was *the* source of contention on fs-intensive
  398. loads and dropping BKL on ->release() helps to get rid of that (we still
  399. grab BKL for cases when we close a file that had been opened r/w, but that
  400. can and should be done using the internal locking with smaller critical areas).
  401. Current worst offender is ext2_get_block()...
  402. ->fasync() is a mess. This area needs a big cleanup and that will probably
  403. affect locking.
  404. ->readdir() and ->ioctl() on directories must be changed. Ideally we would
  405. move ->readdir() to inode_operations and use a separate method for directory
  406. ->ioctl() or kill the latter completely. One of the problems is that for
  407. anything that resembles union-mount we won't have a struct file for all
  408. components. And there are other reasons why the current interface is a mess...
  409. ->ioctl() on regular files is superceded by the ->unlocked_ioctl() that
  410. doesn't take the BKL.
  411. ->read on directories probably must go away - we should just enforce -EISDIR
  412. in sys_read() and friends.
  413. ->fsync() has i_mutex on inode.
  414. --------------------------- dquot_operations -------------------------------
  415. prototypes:
  416. int (*initialize) (struct inode *, int);
  417. int (*drop) (struct inode *);
  418. int (*alloc_space) (struct inode *, qsize_t, int);
  419. int (*alloc_inode) (const struct inode *, unsigned long);
  420. int (*free_space) (struct inode *, qsize_t);
  421. int (*free_inode) (const struct inode *, unsigned long);
  422. int (*transfer) (struct inode *, struct iattr *);
  423. int (*write_dquot) (struct dquot *);
  424. int (*acquire_dquot) (struct dquot *);
  425. int (*release_dquot) (struct dquot *);
  426. int (*mark_dirty) (struct dquot *);
  427. int (*write_info) (struct super_block *, int);
  428. These operations are intended to be more or less wrapping functions that ensure
  429. a proper locking wrt the filesystem and call the generic quota operations.
  430. What filesystem should expect from the generic quota functions:
  431. FS recursion Held locks when called
  432. initialize: yes maybe dqonoff_sem
  433. drop: yes -
  434. alloc_space: ->mark_dirty() -
  435. alloc_inode: ->mark_dirty() -
  436. free_space: ->mark_dirty() -
  437. free_inode: ->mark_dirty() -
  438. transfer: yes -
  439. write_dquot: yes dqonoff_sem or dqptr_sem
  440. acquire_dquot: yes dqonoff_sem or dqptr_sem
  441. release_dquot: yes dqonoff_sem or dqptr_sem
  442. mark_dirty: no -
  443. write_info: yes dqonoff_sem
  444. FS recursion means calling ->quota_read() and ->quota_write() from superblock
  445. operations.
  446. ->alloc_space(), ->alloc_inode(), ->free_space(), ->free_inode() are called
  447. only directly by the filesystem and do not call any fs functions only
  448. the ->mark_dirty() operation.
  449. More details about quota locking can be found in fs/dquot.c.
  450. --------------------------- vm_operations_struct -----------------------------
  451. prototypes:
  452. void (*open)(struct vm_area_struct*);
  453. void (*close)(struct vm_area_struct*);
  454. int (*fault)(struct vm_area_struct*, struct vm_fault *);
  455. struct page *(*nopage)(struct vm_area_struct*, unsigned long, int *);
  456. int (*page_mkwrite)(struct vm_area_struct *, struct page *);
  457. locking rules:
  458. BKL mmap_sem PageLocked(page)
  459. open: no yes
  460. close: no yes
  461. fault: no yes
  462. nopage: no yes
  463. page_mkwrite: no yes no
  464. ->page_mkwrite() is called when a previously read-only page is
  465. about to become writeable. The file system is responsible for
  466. protecting against truncate races. Once appropriate action has been
  467. taking to lock out truncate, the page range should be verified to be
  468. within i_size. The page mapping should also be checked that it is not
  469. NULL.
  470. ================================================================================
  471. Dubious stuff
  472. (if you break something or notice that it is broken and do not fix it yourself
  473. - at least put it here)
  474. ipc/shm.c::shm_delete() - may need BKL.
  475. ->read() and ->write() in many drivers are (probably) missing BKL.
  476. drivers/sgi/char/graphics.c::sgi_graphics_nopage() - may need BKL.