Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756587AbbEVIz4 (ORCPT ); Fri, 22 May 2015 04:55:56 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33921 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756283AbbEVIzv (ORCPT ); Fri, 22 May 2015 04:55:51 -0400 Date: Fri, 22 May 2015 17:56:12 +0900 From: Sergey Senozhatsky To: Marcin Jabrzyk Cc: minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kyungmin.park@samsung.com Subject: Re: [PATCH] zram: check compressor name before setting it Message-ID: <20150522085523.GA709@swordfish> References: <1432283515-2005-1-git-send-email-m.jabrzyk@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432283515-2005-1-git-send-email-m.jabrzyk@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 873 Lines: 28 On (05/22/15 10:31), Marcin Jabrzyk wrote: > Zram sysfs interface was not making any check of > proper compressor name when setting it. > Any name is accepted, but further tries of device > creation would end up with not very meaningfull error. > eg. > > echo lz0 > comp_algorithm > echo 200M > disksize > echo: write error: Invalid argument > no. zram already complains about failed comp backend creation. it's in dmesg (or syslog, etc.): "zram: Cannot initialise %s compressing backend" second, there is not much value in exposing zcomp internals, especially when the result is just another line in dmesg output. -ss -- 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/