/* * Copyright(c) 2007 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #ifndef _FC_GS_H_ #define _FC_GS_H_ #include /* * Fibre Channel Services - Common Transport. * From T11.org FC-GS-2 Rev 5.3 November 1998. */ struct fc_ct_hdr { __u8 ct_rev; /* revision */ __u8 ct_in_id[3]; /* N_Port ID of original requestor */ __u8 ct_fs_type; /* type of fibre channel service */ __u8 ct_fs_subtype; /* subtype */ __u8 ct_options; __u8 _ct_resvd1; __be16 ct_cmd; /* command / response code */ __be16 ct_mr_size; /* maximum / residual size */ __u8 _ct_resvd2; __u8 ct_reason; /* reject reason */ __u8 ct_explan; /* reason code explanation */ __u8 ct_vendor; /* vendor unique data */ }; #define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */ enum fc_ct_rev { FC_CT_REV = 1 /* common transport revision */ }; /* * ct_fs_type values. */ enum fc_ct_fs_type { FC_FST_ALIAS = 0xf8, /* alias service */ FC_FST_MGMT = 0xfa, /* management service */ FC_FST_TIME = 0xfb, /* time service */ FC_FST_DIR = 0xfc, /* directory service */ }; /* * ct_cmd: Command / response codes */ enum fc_ct_cmd { FC_FS_RJT = 0x8001, /* reject */ FC_FS_ACC = 0x8002, /* accept */ }; /* * FS_RJT reason codes. */ enum fc_ct_reason { FC_FS_RJT_CMD = 0x01, /* invalid command code */ FC_FS_RJT_VER = 0x02, /* invalid version level */ FC_FS_RJT_LOG = 0x03, /* logical error */ FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */ FC_FS_RJT_BSY = 0x05, /* logical busy */ FC_FS_RJT_PROTO = 0x07, /* protocol error */ FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */ FC_FS_RJT_UNSUP = 0x0b, /* command not supported */ }; /* * FS_RJT reason code explanations. */ enum fc_ct_explan { FC_FS_EXP_NONE = 0x00, /* no additional explanation */ FC_FS_EXP_PID = 0x01, /* port ID not registered */ FC_FS_EXP_PNAM = 0x02, /* port name not registered */ FC_FS_EXP_NNAM = 0x03, /* node name not registered */ FC_FS_EXP_COS = 0x04, /* class of service not registered */ FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */ /* definitions not complete */ }; #endif /* _FC_GS_H_ */ t-next.git/commit/?id=e47483bca2cc59a4593b37a270b16ee42b1d9f08'>root/sound/firewire/digi00x/digi00x-midi.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2017-01-24 15:18:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:26:14 -0800
commite47483bca2cc59a4593b37a270b16ee42b1d9f08 (patch)
tree4bc66bd4f2f87a30d231068468d29900685fb45f /sound/firewire/digi00x/digi00x-midi.c
parent5ce9bfef1d27944c119a397a9d827bef795487ce (diff)
mm, page_alloc: fix premature OOM when racing with cpuset mems update
Ganapatrao Kulkarni reported that the LTP test cpuset01 in stress mode triggers OOM killer in few seconds, despite lots of free memory. The test attempts to repeatedly fault in memory in one process in a cpuset, while changing allowed nodes of the cpuset between 0 and 1 in another process. The problem comes from insufficient protection against cpuset changes, which can cause get_page_from_freelist() to consider all zones as non-eligible due to nodemask and/or current->mems_allowed. This was masked in the past by sufficient retries, but since commit 682a3385e773 ("mm, page_alloc: inline the fast path of the zonelist iterator") we fix the preferred_zoneref once, and don't iterate over the whole zonelist in further attempts, thus the only eligible zones might be placed in the zonelist before our starting point and we always miss them. A previous patch fixed this problem for current->mems_allowed. However, cpuset changes also update the task's mempolicy nodemask. The fix has two parts. We have to repeat the preferred_zoneref search when we detect cpuset update by way of seqcount, and we have to check the seqcount before considering OOM. [akpm@linux-foundation.org: fix typo in comment] Link: http://lkml.kernel.org/r/20170120103843.24587-5-vbabka@suse.cz Fixes: c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in a zonelist twice") Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Ganapatrao Kulkarni <gpkulkarni@gmail.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Michal Hocko <mhocko@suse.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/firewire/digi00x/digi00x-midi.c')