Revision 50338b889dc504c69e0cb316ac92d1b9e51f3c8a authored by Török Edwin on 15 June 2011, 21:06:14 UTC, committed by Al Viro on 16 June 2011, 15:27:39 UTC
Git bisection shows that commit e6bc45d65df8599fdbae73be9cec4ceed274db53 causes BUG_ONs under high I/O load: kernel BUG at fs/inode.c:1368! [ 2862.501007] Call Trace: [ 2862.501007] [<ffffffff811691d8>] d_kill+0xf8/0x140 [ 2862.501007] [<ffffffff81169c19>] dput+0xc9/0x190 [ 2862.501007] [<ffffffff8115577f>] fput+0x15f/0x210 [ 2862.501007] [<ffffffff81152171>] filp_close+0x61/0x90 [ 2862.501007] [<ffffffff81152251>] sys_close+0xb1/0x110 [ 2862.501007] [<ffffffff814c14fb>] system_call_fastpath+0x16/0x1b A reliable way to reproduce this bug is: Login to KDE, run 'rsnapshot sync', and apt-get install openjdk-6-jdk, and apt-get remove openjdk-6-jdk. The buggy part of the patch is this: struct inode *inode = NULL; ..... - if (nd.last.name[nd.last.len]) - goto slashes; inode = dentry->d_inode; - if (inode) - ihold(inode); + if (nd.last.name[nd.last.len] || !inode) + goto slashes; + ihold(inode) ... if (inode) iput(inode); /* truncate the inode here */ If nd.last.name[nd.last.len] is nonzero (and thus goto slashes branch is taken), and dentry->d_inode is non-NULL, then this code now does an additional iput on the inode, which is wrong. Fix this by only setting the inode variable if nd.last.name[nd.last.len] is 0. Reference: https://lkml.org/lkml/2011/6/15/50 Reported-by: Norbert Preining <preining@logic.at> Reported-by: Török Edwin <edwintorok@gmail.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Török Edwin <edwintorok@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a685e08
mcode.bin.ihex
:100000003F452C01010301190F0000000000000012
:10001000000000000F0F0F0F0F0F0F0F0000000068
:1000200000000000000000000000000000000000D0
:1000300000000000000000000000000000000000C0
:100040000000000000000000C3120D0501000000C8
:1000500000FF000000000000FF80FFFF0100000023
:10006000000000000000002300000000000700FF67
:1000700000000000FFFFFF00000000000000E48817
:100080000000000080734804360000A2C2008073A4
:1000900003233640B600360005D60CD212DA00A291
:1000A000C20092801E985000F5004898DF23366009
:1000B000B60092804F00F5004898EF233660B600F6
:1000C000928080629280004615EE13EA020109D800
:1000D000CD044D0000A3D600A6977F2304618401C0
:1000E000E684D2C18073CD044D0000A3DA01A69747
:1000F000C681C28880738077000101A1FE004F0095
:10010000849707A6080100330300C288030301DEB9
:10011000C288CE006960CE0002034A6000A2780166
:10012000806307A62401788103038063E20007A6A9
:10013000340100330400C2880307020104CA0D23FE
:1001400068984D04048505D80D236898CD041523BF
:10015000F888FB23026182018063020306A3620127
:1001600000330A00C2884E0007A36E0100330B0063
:10017000C288CD04362D00331A00C288500488810D
:1001800006AB820188814E0007A39201500000A3B4
:100190003C0100057C814697020105C60423A001AD
:1001A0001523A101BE81FD23026182010ADA4A0002
:1001B000066100A0B4018063CD04362D00331B001E
:1001C000C28806236898CD04E684060100A2D40103
:1001D000576000A0DA01E6848023A001E6848073E2
:1001E0004B00066100A2000204010CDE020103CCF8
:1001F0004F008497FC810823024182014F006297DF
:1002000048048480F0970046560003C00123E800AC
:1002100081730629034206E203EE6BEB1123F88893
:100220000498F0808073807707A42A027C9506A644
:10023000340203A64C044682040103D8B4986A969B
:100240004682FE95806783038063B62D02A66C020A
:1002500007A65A0206A65E0203A66202C2887C9521
:100260004882609648820423A0011423A1013C84A3
:1002700004010CDCE0232561EF0014014F04A80108
:100280006F00A5010323A40106239C01242B1C015C
:1002900002A6AA0207A65A0206A65E0203A6200428
:1002A00001A6B40200A6B40200331200C288000EF8
:1002B0008063004300A08C024D0404010BDCE723A3
:1002C00004618401103112351401EC006C38003FD8
:1002D0000000EA821823046118A0E2020401A2C807
:1002E00000331F00C28808310A350C390E3D7E9854
:1002F000B62D01A6140300A6140307A60C0306A638
:10030000100303A6200402A66C0200333300C28847
:100310007C95EE826096EE82829880427E9864E4BC
:1003200004012DC83105070100A2540300438701D1
:10033000050586987E9800A6160307A64C0303A61B
:100340003C0406A6500301A6160300332500C2880C
:100350007C95328360963283040110CE07C8050570
:10036000EB0400330020C020816272830001050588
:10037000FFA27A03B1010823B2012E8305051501FE
:1003800000A29A03EC006E0095016C38003F00005B
:1003900001A6960300A69603108480427E9801A6CB
:1003A000A40300A6BC031084A898804201A6A4035D
:1003B00007A6B203D4837C95A88300332F00C2889C
:1003C000A898804200A6BC0307A6CA03D4837C95E4
:1003D000C08300332600C288382B80328036042345
:1003E000A0011223A101108407F006A4F403806B7E
:1003F000806705238303806303A60E0407A6060413
:1004000006A60A0400331700C2887C95F483609620
:10041000F483208407F006A42004806B8067052302
:1004200083038063B62D03A63C0407A6340406A606
:10043000380400333000C2887C9520846096208484
:100440001D0106CC00330084C0200023EA00816235
:10045000A20D806307A65A0400331800C288030364
:100460008063A30107A46404230100A286040AA0F8
:100470007604E00000331D00C2880BA08204E00077
:1004800000331E00C2884223F888002322A3E6041A
:10049000082322A3A204282322A3AE04022322A31A
:1004A000C4044223F8884A00066100A0AE04452334
:1004B000F888049800A2C004B49800330082C020D9
:1004C0008162E8814723F88804010BDE0498B49820
:1004D00000330081C0208162140100A00002432388
:1004E000F8880423A0014423A10180734D0003A3D5
:1004F000F40400332700C288040104DC0223A201B3
:100500000423A001049826954B00F6004F044F00E9
:1005100000A3220500057600066100A21C050A85DD
:100520004697CD04248548048480020103DA8023A1
:10053000820134850223A0014A00066100A2400521
:100540001D0104D6FF2386414B60CB00FF238001B1
:1005500049008101040102C830018001F704030150
:1005600049048001C90000050001FFA0600577046F
:100570000123EA005D00FEC700620023EA00006379
:1005800007A4F805030302A08E05F48500332D00AF
:10059000C28804A0B80580630023DF004A0006611A
:1005A00000A2A4051D0106D60223024182015000CB
:1005B00062970485042302418201048508A0BE05D8
:1005C000F48503A0C405F48501A0CE0588008063EE
:1005D000CC8607A0EE055F00002BDF0800A2E60531
:1005E0008067806301A27A067C8506236898482389
:1005F000F88807238000068780637C850023DF005E
:1006000000634A00066100A236061D0116D4C0230D
:1006100007418303806306A61C0600333700C288A7
:100620001D0101D620236360830380630223DF0062
:1006300007A67C05EF046F0000634B000641CB006A
:100640005200066100A24E061D0103CAC0230741E5
:1006500000631D0104CC00330083C020816280232D
:1006600007410063806708238303806300630123DD
:10067000DF0006A6840607A67C058067806300333A
:100680000040C020816200630000FE958303806308
:1006900006A6940607A67C05000001A01407002BFF
:1006A000400E8063010006A6AA0607A67C05400E40
:1006B0008063004300A0A20606A6BC0607A67C0530
:1006C0008067400E806307A67C050023DF0000637F
:1006D00007A6D60600332A00C28803038063890078
:1006E0000A2B07A6E80600332900C288004300A2AF
:1006F000F406C00E8063DE86C00E00330080C0208A
:100700008162040102DA80637C85807B806306A6B7
:100710008C0600332C00C2880CA22E07FE958303A2
:10072000806306A62C0707A67C0500333D00C2881F
:1007300000008067830380630CA0440707A67C0544
:10074000BF2304618401E6840063F0040101F10029
:100750000001F20001058001720471008101700442
:10076000800581050063F004F20072040101F100CC
:1007700070008101700471008101720080017104B8
:100780007000800170040063F004F2007204000144
:10079000F10070008001700471008001720081011D
:1007A000710470008101700400630023B3018305AC
:1007B000A301A201A1010123A0010001C80003A11E
:1007C000C40700330700C28880058105040111C8F1
:1007D0004800B001B1010823B201050148040043FB
:1007E00000A2E4070005DA870001C800FF238001AA
:1007F00005050063F7041A09F6086E040002804339
:100800007608800277040063F7041A09F6086E047C
:10081000000200A0140816880043760880027704BE
:100820000063F3040023F40074008043F400CF401D
:1008300000A2440874040201F7C9F6D9000101A11D
:10084000240804982695248873040063F30475042F
:100850005A88020104D84697049826954A8875005C
:1008600000A3640800054E8873040063807B8063E6
:1008700006A6760800333E00C28880678303806343
:100880000063382B9C88382B928832093105929866
:100890000505B209006300320036003A003E0063ED
:1008A00080328036803A803EB43D0063382B40323F
:1008B0004036403A403E00635A20C94000A0B40888
:1008C0005D00FEC300638073E6200223E8008273AC
:1008D000FFFD80731323F8886620C0200423A00145
:1008E000A123A1018162E28880738077680000A261
:1008F000800003C2F1C74123F8881123A10104231A
:04090000A001E684E8
:00000001FF
/* Microcode buffer is kept after initialization for error recovery. */
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...