Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261707AbVD0PML (ORCPT ); Wed, 27 Apr 2005 11:12:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261711AbVD0PML (ORCPT ); Wed, 27 Apr 2005 11:12:11 -0400 Received: from duempel.org ([81.209.165.42]:40851 "HELO duempel.org") by vger.kernel.org with SMTP id S261707AbVD0PMJ (ORCPT ); Wed, 27 Apr 2005 11:12:09 -0400 Date: Wed, 27 Apr 2005 17:10:40 +0200 From: Max Kellermann To: k8 s Cc: linux-kernel@vger.kernel.org Subject: Re: Doubt Regarding Multithreading and Device Driver Message-ID: <20050427151040.GA5717@roonstrasse.net> Mail-Followup-To: k8 s , linux-kernel@vger.kernel.org References: <699a19ea050427080545fb1676@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <699a19ea050427080545fb1676@mail.gmail.com> User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 610 Lines: 15 On 2005/04/27 17:05, k8 s wrote: > I am storing something into struct file*filp->private_data. > As this is not shared across processes I am not doing any locking > stuff while accessing or putting anything into it. You're talking about kernel variables, aren't you? Kernel memory is shared among all processes, i.e. you _do_ need locking. Max - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/