From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759211Ab3BTTYU (ORCPT ); Wed, 20 Feb 2013 14:24:20 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:21888 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758898Ab3BTTYS (ORCPT ); Wed, 20 Feb 2013 14:24:18 -0500 Message-ID: <512522CF.1020901@oracle.com> Date: Wed, 20 Feb 2013 14:23:59 -0500 From: Sasha Levin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130113 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tejun Heo CC: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] idr: prevent NULL deref on lookups before insertions References: <1361385853-29010-1-git-send-email-sasha.levin@oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20/2013 01:45 PM, Tejun Heo wrote: > Hello, Sasha. > > On Wed, Feb 20, 2013 at 10:44 AM, Sasha Levin wrote: >> 'hint' will be NULL if we're looking up before adding anything >> to the IDR. >> >> Signed-off-by: Sasha Levin > > Andy Shevchenko already posted fix (and free_layer() needs an update too). Sorry about that, didn't see one on lkml so I've sent mine. What about a patch that deals with: [ 67.992946] ------------[ cut here ]------------ [ 67.994133] WARNING: at lib/idr.c:669 idr_find_slowpath+0x36/0x170() [ 67.999650] Modules linked in: [ 68.000469] Pid: 7156, comm: trinity Tainted: G W 3.8.0-next-20130220-sasha-00006-g3d6f01c-dirty #6 [ 68.005136] Call Trace: [ 68.005719] [] warn_slowpath_common+0x8b/0xc0 [ 68.011168] [] warn_slowpath_null+0x15/0x20 [ 68.012488] [] idr_find_slowpath+0x36/0x170 [ 68.013805] [] __lock_timer+0x12f/0x240 [ 68.015686] [] ? posix_timer_fn+0xd0/0xd0 [ 68.016946] [] sys_timer_delete+0x2c/0x180 [ 68.018478] [] ? tracesys+0x7e/0xe6 [ 68.019647] [] tracesys+0xe1/0xe6 [ 68.020941] ---[ end trace 6d02b1896fa2505b ]--- Thanks, Sasha