mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* question about kill PIDTYPE_TGID patch
@ 2006-08-09 11:23 merlin
  2006-08-09 11:29 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: merlin @ 2006-08-09 11:23 UTC (permalink / raw)
  To: linux-kernel

Hello,

I'm trying to compile IBM GPFS(2.3.0-15) Portability Layer with a 2.6.16 
kernel (2.6.16-1.2289_FC6-xen-i686). The compiler stops with 
the error message below:

kdump-kern.c:163: error: `PIDTYPE_TGID' undeclared (first use in this 
function)

As I think, this is because of the PIDTYPE_TGID patch. 

I don't want to get out that patch from the kernel , if there's
a more simple solution.

I hope you can suggest me a solution for the three lines where PIDTYPE_TGID
appears (see below) in the source code.

I'm not subscribed, please CC me the answer!
Thank you very much.
Michael HÉDER

Here comes a part of /usr/lpp/mmfs/src/gpl-linux/kdump-kern.c, this is the 
only function where  PIDTYPE_TGID appears.
=========================================== 
/* Step to next thread in current task.  If no more threads, step to
   next task.  If no more tasks, return false. */
static Boolean tiNext(struct threadIter *ti)
{
#if LINUX_KERNEL_VERSION >= 2060000

#if LINUX_KERNEL_VERSION < 2060900
  unsigned long pidAddr, headAddr, nextAddr;
  struct pid_link *linkP;

  assert(ti->taskP != NULL);
  linkP = &ti->threadP->pids[PIDTYPE_TGID];

  pidAddr = (unsigned long) linkP->pidptr;
  headAddr = pidAddr + offsetof(struct pid, task_list);

  nextAddr = (unsigned long) linkP->pid_chain.next;

  if (nextAddr == headAddr)
  {
    struct pid *pidP = GenericGet(pidAddr, sizeof(struct pid));
    nextAddr = (unsigned long) pidP->task_list.next;
    kFree(pidP);
  }
#else
  unsigned long nextAddr;
  nextAddr = ti->threadP->pids[PIDTYPE_TGID].pid_list.next;
#endif

  ti->threadAddr = (unsigned long) pid_task((struct list_head *) nextAddr,
                                            PIDTYPE_TGID);
  if (ti->threadAddr != ti->taskAddr)
  {
    if (ti->threadP != ti->taskP)
      kFree(ti->threadP);
    ti->threadP = GetTaskStruct(ti->threadAddr);
  }
  else
  {
    ti->taskAddr = ti->threadAddr = (unsigned long) NEXT_TASK(ti->taskP);
    kFree(ti->taskP);
    if (ti->threadP != ti->taskP)
      kFree(ti->threadP);
    ti->taskP = ti->threadP = (ti->taskAddr == TaskAddress) ?
      NULL : GetTaskStruct(ti->taskAddr);
  }

  return ti->threadP != NULL;
#else
  assert(ti->taskP != NULL);
  ti->taskAddr = ti->threadAddr = (unsigned long) NEXT_TASK(ti->taskP);
  kFree(ti->taskP);
                  ti->taskP = ti->threadP = (ti->taskAddr == TaskAddress) ?
    NULL : GetTaskStruct(ti->taskAddr);

  return ti->threadP != NULL;
#endif
}
     

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about kill PIDTYPE_TGID patch
  2006-08-09 11:23 question about kill PIDTYPE_TGID patch merlin
@ 2006-08-09 11:29 ` Christoph Hellwig
  2006-08-11 13:58   ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2006-08-09 11:29 UTC (permalink / raw)
  To: merlin; +Cc: linux-kernel

On Wed, Aug 09, 2006 at 01:23:12PM +0200, merlin@sztaki.hu wrote:
> Hello,
> 
> I'm trying to compile IBM GPFS(2.3.0-15) Portability Layer with a 2.6.16 
> kernel (2.6.16-1.2289_FC6-xen-i686). The compiler stops with 
> the error message below:
> 
> kdump-kern.c:163: error: `PIDTYPE_TGID' undeclared (first use in this 
> function)
> 
> As I think, this is because of the PIDTYPE_TGID patch. 
> 
> I don't want to get out that patch from the kernel , if there's
> a more simple solution.
> 
> I hope you can suggest me a solution for the three lines where PIDTYPE_TGID
> appears (see below) in the source code.

Just stop using broken, propritary out of tree code.  If you refuse to
do that go to your IBM support contact and whine to them, it's their fault
after all.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about kill PIDTYPE_TGID patch
  2006-08-09 11:29 ` Christoph Hellwig
@ 2006-08-11 13:58   ` Eric W. Biederman
  0 siblings, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2006-08-11 13:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: merlin, linux-kernel

Christoph Hellwig <hch@infradead.org> writes:

> On Wed, Aug 09, 2006 at 01:23:12PM +0200, merlin@sztaki.hu wrote:
>> Hello,
>> 
>> I'm trying to compile IBM GPFS(2.3.0-15) Portability Layer with a 2.6.16 
>> kernel (2.6.16-1.2289_FC6-xen-i686). The compiler stops with 
>> the error message below:
>> 
>> kdump-kern.c:163: error: `PIDTYPE_TGID' undeclared (first use in this 
>> function)
>> 
>> As I think, this is because of the PIDTYPE_TGID patch. 
>> 
>> I don't want to get out that patch from the kernel , if there's
>> a more simple solution.
>> 
>> I hope you can suggest me a solution for the three lines where PIDTYPE_TGID
>> appears (see below) in the source code.
>
> Just stop using broken, propritary out of tree code.  If you refuse to
> do that go to your IBM support contact and whine to them, it's their fault
> after all.

What makes this very funny is that if the GPFS code had called the appropriate
function it would not have broken.  The appropriate function is the same
in 2.4.x as it is in 2.6.

Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-11 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-09 11:23 question about kill PIDTYPE_TGID patch merlin
2006-08-09 11:29 ` Christoph Hellwig
2006-08-11 13:58   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome