From patchwork Sun Aug 20 18:13:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 9911287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C84DD603F3 for ; Sun, 20 Aug 2017 18:13:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0BA828703 for ; Sun, 20 Aug 2017 18:13:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B532B28776; Sun, 20 Aug 2017 18:13:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06FA28703 for ; Sun, 20 Aug 2017 18:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753380AbdHTSNc (ORCPT ); Sun, 20 Aug 2017 14:13:32 -0400 Received: from simcoe208srvr.owm.bell.net ([184.150.200.208]:54725 "EHLO torfep02.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753379AbdHTSNb (ORCPT ); Sun, 20 Aug 2017 14:13:31 -0400 Received: from bell.net torfep02 184.150.200.158 by torfep02.bell.net with ESMTP id <20170820181329.CJJA12599.torfep02.bell.net@torspm02.bell.net> for ; Sun, 20 Aug 2017 14:13:29 -0400 Received: from [192.168.2.25] (really [70.55.25.117]) by torspm02.bell.net with ESMTP id <20170820181329.UXXF25422.torspm02.bell.net@[192.168.2.25]>; Sun, 20 Aug 2017 14:13:29 -0400 Subject: Re: Kernel panic building polyml Mime-Version: 1.0 (Apple Message framework v1085) From: John David Anglin In-Reply-To: Date: Sun, 20 Aug 2017 14:13:29 -0400 Cc: linux-parisc List Message-Id: <887D24D5-832C-409A-83AF-646E4937E87E@bell.net> References: To: John David Anglin X-Mailer: Apple Mail (2.1085) X-Cloudmark-Analysis: v=2.2 cv=I5WKfJog c=1 sm=0 tr=0 a=L9YmJBVkqdxzVdbQY8UOKg==:17 a=KeKAF7QvOSUA:10 a=TRp10MNlOk5OMdTRogkA:9 a=CjuIK1q_8ugA:10 a=BwqKboPiwLvP9zfYuJEA:9 a=VxAhp2OGdTwA:10 a=Ld372NDzu18A:10 a=FBHGMhGWAAAA:8 a=x4eo2g6fNBR7jntNTckA:9 a=ATlVsGG5QSsA:10 a=9gvnlMMaQFpL9xblJ6ne:22 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 2017-08-19, at 8:56 AM, John David Anglin wrote: > mx3210 login: systemd-logind[4461]: New seat seat0. > systemd-logind[4461]: Failed to start user service, ignoring: Unknown unit: user@0.service > systemd-logind[4461]: Failed to start user service, ignoring: Unknown unit: user@110.service > Backtrace: > [<00000000402f316c>] compat_get_fd_set+0x5c/0x78 > [<00000000402f3cac>] compat_core_sys_select+0x1cc/0x300 > [<00000000402f52dc>] compat_SyS_select+0x144/0x1a0 > [<0000000040155fe4>] syscall_exit+0x0/0x14 > > > Kernel Fault: Code=26 (Data memory access rights trap) regs=00000002234b84e0 (Addr=0000000000000000) > CPU: 1 PID: 21167 Comm: polyimport Not tainted 4.13.0-rc5+ #1 > task: 0000000223d74b50 task.stack: 00000002234b8000 > > YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI > PSW: 00001000000001101111111100001111 Not tainted > r00-03 000000ff0806ff0f 00000002234b8420 00000000402f316c 00000002234b84a0 > r04-07 000000004071c960 00000002234b82b8 00000002234b8218 0000000000000100 > r08-11 0000000000000004 0000000000000100 00000000f3780588 0000000000000000 > r12-15 0000000000000000 00000002234b8148 0000000000000000 00000002234b8218 > r16-19 0000000000000000 000000000002f03c 000000000002f030 0000000000000000 > r20-23 0000000000000100 0000000000000000 00000002234b8148 0000000000000000 > r24-27 0000000000000100 0000000000000000 0000000000000000 000000004071c960 > r28-31 0000000000000000 00000002234b8470 00000002234b84e0 0000000000000000 > sr00-03 0000000003f15000 0000000003f15000 0000000003f15000 0000000003f15000 > sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > > IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000406a4718 00000000406a471c > IIR: 0ff312c0 ISR: 0000000000000000 IOR: 0000000000000000 > CPU: 1 CR30: 00000002234b8000 CR31: b33e06ff0008e07f > ORIG_R28: 0000000000000040 > IAOQ[0]: memset+0x68/0xd8 > IAOQ[1]: memset+0x6c/0xd8 > RP(r2): compat_get_fd_set+0x5c/0x78 > Backtrace: > [<00000000402f316c>] compat_get_fd_set+0x5c/0x78 > [<00000000402f3cac>] compat_core_sys_select+0x1cc/0x300 > [<00000000402f52dc>] compat_SyS_select+0x144/0x1a0 > [<0000000040155fe4>] syscall_exit+0x0/0x14 > > Kernel panic - not syncing: Kernel Fault > ---[ end Kernel panic - not syncing: Kernel Fault The attached patch is probably not the real fix but it should prevent the panic. --- John David Anglin dave.anglin@bell.net PS: the above crash is what broke the dsa-puppet git archive on mx3210. diff --git a/fs/select.c b/fs/select.c index d6c652a31e99..8790c0a0bd3c 100644 --- a/fs/select.c +++ b/fs/select.c @@ -1181,6 +1181,8 @@ int compat_get_fd_set(unsigned long nr, compat_ulong_t __user *ufdset, if (odd && __get_user(*fdset, ufdset)) return -EFAULT; } else { + if (!fdset) + return -EFAULT; /* Tricky, must clear full unsigned long in the * kernel fdset at the end, this makes sure that * actually happens.