Return-path: Received: from mail-ig0-f169.google.com ([209.85.213.169]:38054 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbbELUf7 (ORCPT ); Tue, 12 May 2015 16:35:59 -0400 MIME-Version: 1.0 In-Reply-To: <1431455457-25322-4-git-send-email-mcgrof@do-not-panic.com> References: <1431455457-25322-1-git-send-email-mcgrof@do-not-panic.com> <1431455457-25322-4-git-send-email-mcgrof@do-not-panic.com> Date: Tue, 12 May 2015 13:35:59 -0700 Message-ID: (sfid-20150512_223635_698216_036D5F81) Subject: Re: [PATCH v2 3/5] firmware: check for possible file truncation early From: Linus Torvalds To: "Luis R. Rodriguez" Cc: Ming Lei , Rusty Russell , David Howells , Seth Forshee , Linux Kernel Mailing List , Paul Bolle , Linux Wireless List , "Luis R. Rodriguez" , Kyle McMartin Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, May 12, 2015 at 11:30 AM, Luis R. Rodriguez wrote: > > Instead of waiting until the last second to fail > on a request_firmware*() calls due to filename > truncation we can do an early check upon boot > and immediatley avoid any possible issues upfront. Why? This looks stupid. Why add this special case, when normal path lookup results in the proper errors? And if invalid pathnames are so frequent that this special case is somehow worth it, we should fix whoever generates that crap, instead of adding this insane special case. And if we don't handle the errors from normal path lookup properly, then we should fix *that*. In other words, I see absolutely no reason for this patch. Regardless of the reason for it, it seems entirely broken. Linus