Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759448AbcDERc4 (ORCPT ); Tue, 5 Apr 2016 13:32:56 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34491 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932812AbcDERcx (ORCPT ); Tue, 5 Apr 2016 13:32:53 -0400 Date: Wed, 6 Apr 2016 01:32:48 +0800 From: Minfei Huang To: Josh Poimboeuf Cc: Jiri Kosina , Jessica Yu , Miroslav Benes , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Vojtech Pavlik Subject: Re: [RFC PATCH v1.9 12/14] livepatch: create per-task consistency model Message-ID: <20160405173248.GA2450@huangminfeis-MacBook-Pro.local> References: <74a2b37cea7a64a185e50876dba031137aa59a24.1458933243.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74a2b37cea7a64a185e50876dba031137aa59a24.1458933243.git.jpoimboe@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 492 Lines: 19 On 03/25/16 at 02:34P, Josh Poimboeuf wrote: > +static int klp_check_stack(struct task_struct *task) > +{ > + static unsigned long entries[MAX_STACK_ENTRIES]; > + struct stack_trace trace; > + struct klp_object *obj; > + struct klp_func *func; > + int ret; > + > + trace.skip = 0; > + trace.nr_entries = 0; > + trace.max_entries = MAX_STACK_ENTRIES; > + trace.entries = entries; > + ret = save_stack_trace_tsk_reliable(task, &trace); Format the array entries before using it. Thanks Minfei