Re: [Security] [vendor-sec] [BUG/PATCH/RFC] Oops while completingasync USB via usbdevio

From: Pete Zaitcev
Date: Thu Oct 13 2005 - 18:57:29 EST

On Thu, 13 Oct 2005 16:16:58 -0700 (PDT), Linus Torvalds <torvalds@xxxxxxxx> wrote:

> "release()" won't be called until the _last_ close, and the task that
> opened the fd can certainly exit before that.
> It's a fundamental mistake to think that file descriptors stay with the
> process that opened them.

I am quite aware and my proposal takes it into account. I am sorry that
I failed to explain it adequately.

Did you even look at the pseudocode though?

-- Pete

as->pid = current->pid;
as->tgid = current->tgid;
__kill_same_process(as->pid, as->tgid);

/* DO NOT USE IN DRIVERS (other than USB core) */
__kill_same_process(pid_t pid, pid_t tgid) {
task_struct *we, *maybe_parent;
we = find_task_by_pid(pid);
maybe_parent = find_task_by_tgid(pid);
if (maybe_parent != NULL && we->parent == maybe_parent)
send_sig_info(sig, info, we);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at