Bugzilla – Attachment 53882 Details for
Bug 127916
kernel crash at (de)registration of USB device
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
usbdevio-2.patch
usbdevio-2.patch (text/plain), 4.91 KB, created by
Olaf Hering
on 2005-10-12 21:09:15 UTC
(
hide
)
Description:
usbdevio-2.patch
Filename:
MIME Type:
Creator:
Olaf Hering
Created:
2005-10-12 21:09:15 UTC
Size:
4.91 KB
patch
obsolete
>Return-Path: <git-commits-head-owner@vger.kernel.org> >X-Original-To: olh@wotan.suse.de >Received: from Relay1.suse.de (relay1.suse.de [IPv6:2001:780:101:0:211:25ff:fe4a:6dba]) > by wotan.suse.de (Postfix) with ESMTP id 451D8422650 > for <olh@wotan.suse.de>; Tue, 11 Oct 2005 03:59:31 +0200 (CEST) >Received: by Relay1.suse.de (Postfix) > id 3D226298C7; Tue, 11 Oct 2005 03:59:31 +0200 (CEST) >Received: from Relay1.suse.de (localhost [127.0.0.1]) > by Relay1.suse.de (Postfix) with ESMTP id 276952BED7 > for <olh@suse.de>; Tue, 11 Oct 2005 03:59:31 +0200 (CEST) >Received: from Relay1.suse.de ([127.0.0.1]) > by Relay1.suse.de (Relay1 [127.0.0.1]) (amavisd-new, port 10026) with ESMTP > id 04206-02 for <olh@suse.de>; Tue, 11 Oct 2005 03:59:30 +0200 (CEST) >Received: from mx1.suse.de (mail.suse.de [195.135.220.2]) > (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) > (No client certificate requested) > by Relay1.suse.de (Postfix) with ESMTP id D43982BEF8 > for <olh@suse.de>; Tue, 11 Oct 2005 03:59:30 +0200 (CEST) >Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) > by mx1.suse.de (Postfix) with ESMTP id 60374E3B4 > for <olh@suse.de>; Tue, 11 Oct 2005 03:59:30 +0200 (CEST) >Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand > id S1751352AbVJKB73 (ORCPT <rfc822;olh@suse.de>); > Mon, 10 Oct 2005 21:59:29 -0400 >Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751351AbVJKB73 > (ORCPT <rfc822;git-commits-head-outgoing>); > Mon, 10 Oct 2005 21:59:29 -0400 >Received: from hera.kernel.org ([140.211.167.34]:34184 "EHLO hera.kernel.org") > by vger.kernel.org with ESMTP id S1751352AbVJKB73 (ORCPT > <rfc822;git-commits-head@vger.kernel.org>); > Mon, 10 Oct 2005 21:59:29 -0400 >Received: from hera.kernel.org (localhost [127.0.0.1]) > by hera.kernel.org (8.13.1/8.13.1) with ESMTP id j9B1xRtE025196 > for <git-commits-head@vger.kernel.org>; Mon, 10 Oct 2005 18:59:27 -0700 >Received: (from dwmw2@localhost) > by hera.kernel.org (8.13.1/8.13.1/Submit) id j9B1xRHk025195 > for git-commits-head@vger.kernel.org; Mon, 10 Oct 2005 18:59:27 -0700 >Date: Mon, 10 Oct 2005 18:59:27 -0700 >Message-Id: <200510110159.j9B1xRHk025195@hera.kernel.org> >From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org> >To: git-commits-head@vger.kernel.org >Subject: Use the new "kill_proc_info_as_uid()" for USB disconnect too >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >X-Git-Commit: d7dd8a72ab8d305fbe1c4bb571e0633eba3a8d23 >X-Git-Parent: 46113830a18847cff8da73005e57bc49c2f95a56 >X-Virus-Status: Clean >Sender: git-commits-head-owner@vger.kernel.org >Precedence: bulk >X-Mailing-List: git-commits-head@vger.kernel.org >X-Virus-Scanned: by amavisd-new at Relay1.suse.de >X-Spam-Status: No, hits=0.0 tagged_above=-20.0 required=5.0 tests=BAYES_50 >X-Spam-Level: >X-my-mailinglist-tag: git-commits-head.vger.kernel.org > >tree b1df87ccb102bbe4c2402a677d62bc6a0b85282e >parent 46113830a18847cff8da73005e57bc49c2f95a56 >author Linus Torvalds <torvalds@g5.osdl.org> Tue, 11 Oct 2005 06:31:30 -0700 >committer Linus Torvalds <torvalds@g5.osdl.org> Tue, 11 Oct 2005 06:31:30 -0700 > >Use the new "kill_proc_info_as_uid()" for USB disconnect too > >All the same issues - we can't just save the pointer to the thread, we >must save the pid/uid/euid combination. > >Signed-off-by: Linus Torvalds <torvalds@osdl.org> > > drivers/usb/core/devio.c | 4 +++- > drivers/usb/core/inode.c | 2 +- > drivers/usb/core/usb.h | 3 ++- > 3 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c >--- a/drivers/usb/core/devio.c >+++ b/drivers/usb/core/devio.c >@@ -530,7 +530,9 @@ static int usbdev_open(struct inode *ino > INIT_LIST_HEAD(&ps->async_completed); > init_waitqueue_head(&ps->wait); > ps->discsignr = 0; >- ps->disctask = current; >+ ps->disc_pid = current->pid; >+ ps->disc_uid = current->uid; >+ ps->disc_euid = current->euid; > ps->disccontext = NULL; > ps->ifclaimed = 0; > wmb(); >diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c >--- a/drivers/usb/core/inode.c >+++ b/drivers/usb/core/inode.c >@@ -713,7 +713,7 @@ void usbfs_remove_device(struct usb_devi > sinfo.si_errno = EPIPE; > sinfo.si_code = SI_ASYNCIO; > sinfo.si_addr = ds->disccontext; >- send_sig_info(ds->discsignr, &sinfo, ds->disctask); >+ kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid); > } > } > usbfs_update_special(); >diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h >--- a/drivers/usb/core/usb.h >+++ b/drivers/usb/core/usb.h >@@ -52,7 +52,8 @@ struct dev_state { > struct list_head async_completed; > wait_queue_head_t wait; /* wake up if a request completed */ > unsigned int discsignr; >- struct task_struct *disctask; >+ pid_t disc_pid; >+ uid_t disc_uid, disc_euid; > void __user *disccontext; > unsigned long ifclaimed; > }; >- >To unsubscribe from this list: send the line "unsubscribe git-commits-head" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 127916
:
53881
| 53882