Revision 3e030ecc0fc7de10fd0da10c1c19939872a31717 authored by Naoya Horiguchi on 22 May 2014, 18:54:21 UTC, committed by Linus Torvalds on 23 May 2014, 16:37:30 UTC
When a memory error happens on an in-use page or (free and in-use) hugepage, the victim page is isolated with its refcount set to one. When you try to unpoison it later, unpoison_memory() calls put_page() for it twice in order to bring the page back to free page pool (buddy or free hugepage list). However, if another memory error occurs on the page which we are unpoisoning, memory_failure() returns without releasing the refcount which was incremented in the same call at first, which results in memory leak and unconsistent num_poisoned_pages statistics. This patch fixes it. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: <stable@vger.kernel.org> [2.6.32+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ad0f614
whiteheat_loader.HEX
:0300000002098D65
:030033000208FBC5
:03004300020B00AD
:03004B000205AA01
:10010000907FA5E05410FFC4540F4450F50F13E442
:1001100033F511907FE9E0245EB407004003020349
:1001200078900128F82828730201BC0201BC020162
:100130009102013D02015302016F02019A907F007A
:10014000E511F0907FB57401F0907FB4E04402F0C7
:10015000020378907F92E0FFC4540F907F00F090EC
:100160007FB57401F0907FB4E04402F0020378128E
:100170000A895007E4907F00F08006907F00740F9A
:10018000F0907FB57401F0907FB4E04402F0020378
:1001900078907FEAE0F50F020378907F007407F013
:1001A000907FB57401F0907FB4E04402F07FE87E68
:1001B00003120D94D206120CCC020378907FEAE071
:1001C000752800F529A3E0FEE4EE4228907FEEE0DA
:1001D000752A00F52BA3E0FEE4EE422A907FE8E0CA
:1001E00064C060030202C9E52B452A70030203784C
:1001F000C3E52B9440E52A94005008852A2C852BD2
:100200002D8006752C00752D40907FE9E064A37069
:1002100034F530F531C3E531952DE530952C505C42
:10022000E5292531F582E5303528F583E0FF7400B6
:100230002531F582E4347FF583EFF00531E5317047
:1002400002053080D0E4F530F531C3E531952DE578
:1002500030952C501874002531F582E4347FF583F5
:1002600074CDF00531E5317002053080DDAF29AE87
:1002700028AD2D7A7F79007B00120BF4907FB5E5D5
:100280002DF0E52D2529F529E52C3528F528C3E5A0
:100290002B952DF52BE52A952CF52A907F92E0FFE2
:1002A000C4540F752E00F52FD39400E52E94005002
:1002B0000C907FB4E020E1030201E780F4907FB46A
:1002C000E020E2030201E780F4907FE8E064406010
:1002D00003020378E52B452A7003020378E4907F3C
:1002E000C5F0907F92E0FFC4540F752E00F52FD318
:1002F0009400E52E94005009907FC4E030E109801D
:10030000F7907FB4E020E3F9907FC5E0752C00F50D
:100310002D907FE9E064A37034F530F531C3E53109
:10032000952DE530952C503474C02531F582E43498
:010330007E4E
:10033100F583E0FFE5292531F582E5303528F583A0
:10034100EFF00531E5317002053080D0AF29AE28DC
:10035100AD2D7A7E79C07BC0120C3FE52D2529F5A4
:1003610029E52C3528F528C3E52B952DF52BE52A14
:09037100952CF52A0202D4C322E6
:10037A00907FE9E070030204521470030204CE2451
:10038A00FE700302054224FB700302044C1470033E
:10039A0002044614700302043A147003020440244F
:1003AA00056003020596120E4440030205A2907FDF
:1003BA00EBE024FE60161460402402706974119008
:1003CA007FD4F07400907FD5F00205A2907FEAE016
:1003DA00FF120B588B258A268927EA496011AE023B
:1003EA00EE907FD4F0AF01EF907FD5F00205A29096
:1003FA007FB4E04401F00205A2907FEAE0FF120810
:10040A00BA8B258A268927EA496011AE02EE907FC7
:10041A00D4F0AF01EF907FD5F00205A2907FB4E04F
:10042A004401F00205A2907FB4E04401F00205A263
:10043A00120E1F0205A2120E2D0205A2120AF702BF
:10044A0005A2120E110205A2120E4640030205A2CF
:10045A00907FE8E0247F60241460312402705BA25C
:10046A0000E433FF25E0FFA202E4334F907F00F05F
:10047A00E4A3F0907FB57402F00205A2E4907F0035
:10048A00F0A3F0907FB57402F00205A2907FECE031
:10049A00F45480FFC4540FFFE054072F25E024B41E
:1004AA00F582E4347FF583E054FD907F00F0E4A305
:1004BA00F0907FB57402F00205A2907FB4E0440187
:1004CA00F00205A2120E4840030205A2907FE8E05E
:1004DA0024FE601D240260030205A2907FEAE0B4B4
:1004EA000105C2000205A2907FB4E04401F00205B2
:1004FA00A2907FEAE07038907FECE0F45480FFC469
:10050A00540FFFE054072F25E024B4F582E4347F2A
:10051A00F583E4F0907FECE05480FF131313541F2B
:10052A00FFE054072F907FD7F0E04420F0806990D5
:10053A007FB4E04401F08060120E4A505B907FE87D
:10054A00E024FE60182402704F907FEAE0B40104B0
:10055A00D2008044907FB4E04401F0803B907FEA6F
:10056A00E07020907FECE0F45480FFC4540FFFE069
:10057A0054072F25E024B4F582E4347FF58374010F
:10058A00F08015907FB4E04401F0800C1201005015
:10059A0007907FB4E04401F0907FB4E04402F02277
:1005AA00C0E0C083C082C085C084C086758600C092
:1005BA00D0C000C001C002C003C006C007907FA51A
:1005CA00E030E206750D06020676907FA5E020E18E
:1005DA000CE50D64026006750D07020676AF0DEF95
:1005EA0024FE604814602C24FE6077240460030211
:1005FA000676AB09AA0AA90BAF0C050C8F82758384
:10060A0000120822907FA6F0E50C6508705E750D51
:10061A00058059907FA6E0AB09AA0AA90BAE0C8EF9
:10062A008275830012084F750D028040E50824FE8A
:10063A00B50C07907FA5E04420F0E50814B50C0A34
:10064A00907FA5E04440F0E4F50D907FA6E0AB0969
:10065A00AA0AA90BAE0C8E8275830012084F050CEC
:10066A00800A907FA5E04440F0E4F50D5391DFD075
:10067A0007D006D003D002D001D000D0D0D086D087
:0A068A0084D085D082D083D0E03206
:100694008C338D34907F95E044C0F0E4F535F53625
:1006A400C3E5369534E53595335069EF2536F58243
:1006B400E5353EF58374FFF0F46002C322EF25367E
:1006C400F582E5353EF583E4F06002C322EF25367A
:1006D400F582E5353EF58374AAF064AA6002C3226C
:1006E400EF2536F582E5353EF5837455F0645560A3
:1006F40002C322AD36E5362FF582E5353EF583EDAE
:10070400F0FCAC05ED6C6002C3220536E5367002E0
:100714000535808CE4F535F536C3E5369534E53595
:1007240095335027EF2536F582E5353EF583E065B0
:10073400366002C322EF2536F582E5353EF583E4C3
:0D074400F00536E5367002053580CED32273
:10075100C204D205C203C200C202C201120E3DD2BE
:10076100E843D820907FAB74FFF0907FA9F0907F91
:10077100AAF05391EF907F95E044C0F0907F93747D
:1007810030F0120A19907FAFE04401F0907FAEE0A3
:10079100440DF0D2AF120E352001427524007523AD
:1007A100007522007521007F487E927D007C00ABA0
:1007B10024AA23A922A821C31208A950DB2001D809
:1007C1007A0079007800E5242401F524EA3523F53F
:1007D10023E93522F522E83521F52180CA300105CA
:1007E10012037AC20130041A120E4050131209008A
:1007F100300007907FD6E030E7F3120D4A120E4227
:08080100C2031208FF80D62299
:10080900BB010689828A83E0225002E722BBFE02ED
:09081900E32289828A83E4932220
:10082200BB010CE58229F582E5833AF583E022508B
:1008320006E92582F8E622BBFE06E92582F8E222D5
:0D084200E58229F582E5833AF583E49322EF
:10084F00F8BB010DE58229F582E5833AF583E8F0DF
:10085F00225006E92582C8F622BBFE05E92582C88B
:02086F00F22273
:10087100BB0110E58229F582E5833AF583E0F5F0C5
:10088100A3E0225009E92582F886F008E622BBFEA2
:100891000AE92582F8E2F5F008E222E5832AF583E8
:0808A100E993F5F0A3E99322AD
:1008A900EB9FF5F0EA9E42F0E99D42F0E89C45F0A5
:0108B900221C
:0208BA008F2885
:1008BC00E4F529752AFF752B11752C32AB2AAA2B5E
:1008CC00A92C900001120822B4031DAF290529EFB1
:1008DC00B52801221208097E0029FFEE3AA90775F6
:0E08EC002AFFF52B892C80D47B007A0079003E
:0108FA0022DB
:0408FB0053D8EF32AD
:0108FF0022D6
:09090000907FD6E04480F0807481
:10097D00438701000000000000000000000000227D
:0C098D00787FE4F6D8FD7581390209D4AA
:10099900020751E493A3F8E493A34003F68001F21C
:1009A90008DFF48029E493A3F85407240CC8C3335F
:1009B900C4540F4420C8834004F456800146F6DF2E
:1009C900E4800B0102040810204080900DECE47EC5
:1009D900019360BCA3FF543F30E509541FFEE49323
:1009E900A360010ECF54C025E060A840B8E493A3EA
:1009F900FAE493A3F8E493A3C8C582C8CAC583CA15
:100A0900F0A3C8C582C8CAC583CADFE9DEE780BECC
:100A1900E4907F9CF07F0AFE120D94907F96748972
:100A2900F0907F9C74CFF07FF47E01120D94907F3B
:100A390096E054FEF07F0A7E00120D947F057E0039
:100A4900120D94907F96E04402F0E0547FF07F0508
:100A59007E00120D94907F96E04440F07F057E0061
:100A6900120D94907F96E054BFF07F327E00120DF4
:100A790094907F96E04440F07F327E00120D9422DC
:100A8900753201E532601B7F01120DD77F007E0EA2
:100A99007D007C01120694E433F53270057F0F1254
:100AA9000DD7E532601B7F02120DD77F007E807D56
:100AB900007C80120694E433F53270057F0F120D25
:100AC900D7E532601B7F03120DD77F007E207D4062
:100AD9007C5B120694E433F53270057F0F120DD753
:0E0AE900E5326005E4FF120DD7E53224FF224E
:080AF700907FEAE0F510D32224
:010AFF0032C4
:100B0000020D6400020DAB00020D2F00020D7C00EF
:100B1000020DC100020AFF00020E4C00020E4D0041
:100B2000020E4E00020E4F00020E5000020E510047
:100B3000020E5200020E5300020E5400020E550027
:100B4000020E5600020E5700020E5800020E590007
:080B5000020E5A00020E5B00C8
:100B5800E4FE752AFF752B11752C12AB2AAA2BA956
:100B68002C9000011208226402702DAD060EEDB51E
:100B780007012290000212087185F028F5296228E1
:100B8800E5286229E529622829FDE5283AA905759D
:0E0B98002AFFF52B892C80C37B007A007900A0
:010BA600222C
:100BA700AB07AA06AC05E4FDE5116011EAFFAE0547
:100BB7000DEE2410F582E4340FF583EFF0EBAE056C
:100BC7000D74102EF582E4340FF583EBF0AF050DAD
:100BD70074102FF582E4340FF583ECF0AF0F7A0F22
:0D0BE7007B10120D107F0A7E00120D94226B
:100BF4008E328F338D348A358B36E4FDF537E5112B
:100C04006012E532FFAE050DEE2413F582E4340FD5
:100C1400F583EFF0E533AE050D74132EF582E4345D
:100C24000FF583E533F0AF0F7A0F7B13120D10AF7E
:0B0C34000FAD34AB36AA35120CF122D4
:100C3F008E328F338D348A358B36E4F537E537C3F3
:100C4F00953450200533E533AE327002053214FF70
:100C5F00E5362537F582E43535F583E0FD120BA730
:050C6F00053780D922C9
:100C7400A907E50D7025907FA5E04480F0E925E003
:100C84004401907FA6F08D08AF03A9077509018A76
:0D0C94000A890BE4F50C750D03D322C32271
:100CA100A907E50D7023907FA5E04480F0E925E0D8
:100CB100907FA6F08D08AF03A9077509018A0A89FB
:0B0CC1000BE4F50C750D01D322C322DB
:100CCC00907FD6E054FBF0E04408F0300604E0449A
:100CDC0002F07FD07E07120D94907FD6E054F7F08F
:050CEC00E04404F022C9
:100CF100120C74E50D24FA6010146007240770F3D8
:0F0D01007F0822E4F50D7F0722E4F50D7F06221F
:100D1000120CA1E50D24FA6010146007240770F38B
:0F0D20007F0822E4F50D7F0722E4F50D7F062200
:100D2F00C0E0C083C082907FC4E4F05391EF907F06
:0B0D3F00AB7404F0D082D083D0E0320F
:100D4A00907FD6E030E712E04401F07F147E001273
:0A0D5A000D94907FD6E054FEF022C5
:100D6400C0E0C083C082D2015391EF907FAB740185
:080D7400F0D082D083D0E03200
:100D7C00C0E0C083C082D2035391EF907FAB740864
:080D8C00F0D082D083D0E032E8
:100D94008E388F39E5391539AE38700215384E6002
:070DA40005120E0080EE2293
:100DAB00C0E0C083C0825391EF907FAB7402F0D050
:060DBB0082D083D0E0327B
:100DC100C0E0C083C0825391EF907FAB7410F0D02C
:060DD10082D083D0E03265
:100DD700AE077F217D0174002EF582E4340FAB82CC
:050DE700FA120D1022BC
:100DEC00500F00C0F9A4B0999282F880988883C6FD
:030DFC00A1868E3F
:010DFF0000F3
:100E00007400F58690FDA57C05A3E582458370F905
:010E100022BF
:0E0E1100907F00E510F0907FB57401F0D322C1
:0E0E1F00907F00E50EF0907FB57401F0D322B5
:080E2D00907FEAE0F50ED322EC
:080E3500E4F50DD2E9D2AF2271
:030E3D00D20022BE
:020E4000D322BB
:020E4200D322B9
:020E4400D322B7
:020E4600D322B5
:020E4800D322B3
:020E4A00D322B1
:010E4C003273
:010E4D003272
:010E4E003271
:010E4F003270
:010E5000326F
:010E5100326E
:010E5200326D
:010E5300326C
:010E5400326B
:010E5500326A
:010E56003269
:010E57003268
:010E58003267
:010E59003266
:010E5A003265
:010E5B003264
:101100001201000100000040470510270100010204
:10111000000109022000010103A0000904000002EF
:10112000FF0000040705820240000007050202409C
:10113000000004030904260341006E0063006800F8
:101140006F007200200043006800690070007300A7
:101150002C00200049006E0063002E00280346008A
:10116000690072006D007700610072006500200068
:101170004600720061006D00650057006F0072004C
:101180006B0073002A0343006F006E006600690065
:101190006700750072006100740069006F006E00E6
:1011A000200053007400720069006E006700220383
:1011B00049006E0074006500720066006100630003
:1011C0006500200053007400720069006E00670023
:0211D00000001D
:00000001FF
/*****************************************************************************
*
* whiteheat.h -- ConnectTech WhiteHEAT Firmware.
*
* Copyright (C) 2000-2002 ConnectTech Inc (http://www.connecttech.com/)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* (10/09/2002) Stuart MacDonald
* Firmware 4.06
*
* (04/09/2000) gkh
* Updated the firmware with the latest provided by ConnectTech.
*
* (01/16/2000) gkh
* Fixed my intel hex processing tool, so now the firmware actually
* matches the original file (this was causing a few problems...)
*
* (01/15/2000) gkh
* Added debug loader firmware if DEBUG is #defined:
* Port 1 LED flashes when the vend_ax program is running
* Port 2 LED flashes when any SETUP command arrives
* Port 3 LED flashes when any valid VENDOR request occurs
* Port 4 LED flashes when the EXTERNAL RAM DOWNLOAD request occurs
*
* version 1.0 (01/09/2000) gkh
* Original firmware from ConnectTech massaged a little to be program
* readable.
*
*****************************************************************************/
#define whiteheat_DATE "20000106"
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...