Google Groups Home
Help | Sign in
Linux 2.6.11-rc4
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Linus Torvalds  
View profile
 More options Feb 12 2005, 10:40 pm
Newsgroups: linux.kernel
From: Linus Torvalds <torva...@osdl.org>
Date: Sun, 13 Feb 2005 04:40:05 +0100
Local: Sat, Feb 12 2005 10:40 pm
Subject: Linux 2.6.11-rc4

Hi there everybody,
 this is hopefully the last -rc kernel before the real 2.6.11, so please
give it a whirl, and complain loudly about anything broken.

As can be seen from the shortlog, most of the changes are pretty trivial.
I think the biggest change is the radeon updates, and some of the NLS
codepage things caused big diffs even if the changes themselves are pretty
trivial (oh, and moving the ia64 "shubio.h" file accounts for about seven
thousand lines of diffs, but no real changes ;)

In short: some driver updates, some arm/uml/sparc updates, and various
random (mostly) one-liners all over. The most noticeable of the one-liners
is hopefully that raid5/6 should work again.

                Linus
----

Summary of changes from v2.6.11-rc3 to v2.6.11-rc4
============================================

Adrian Bunk:
  o [ide] remove WAIT_READY dependency on APM
  o [ide] possible cleanups
  o [CRYPTO]: Make some code static in i386 crypto AES
  o [XFRM]: Kill xfrm_export.c
  o mark the mcd cdrom driver as BROKEN

Alan Cox:
  o more fixes for the Moxa driver

Alan Stern:
  o USB: Fix EHCI boot oops on AMD
  o USB: unusual_devs.h update

Alasdair G. Kergon:
  o device-mapper: stripe_width should be sector_t
  o device-mapper: Fixes for 64-bit sector_t

Albert Lee:
  o [libata] SCSI-to-ATA translation fixes

Alex Yustasov:
  o Add missing configure calls to intel agp resume code

Alexander Viro:
  o sparc64: fix compile with strict mm types
  o via82cxxx: fix ppc32 multiplatform config test
  o [ide] fix ide_dump_atapi_status()
  o [SPARC32]: Fix UP build with spinlock debugging enabled
  o [SPARC]: Trivial annotations in sparc signal.c / svr4.h
  o [SPARC]: NULL noise removal from sparc floppy.h
  o [SPARC64]: Fix prototype of check_signature() - it already gets a
    pointer
  o [SPARC64]: fbio.h __user annotations
  o [SPARC]: __user annotations around sparc{32,64} ptrace
    ...succ_return...()
  o [SPARC]: __user annotations in sparc checksum.h
  o [SPARC]: No iBCS2 on sparc, TYVM
  o [SPARC]: Fix I/O accessor routines
  o [SPARC]: __user annotations in ELF_CORE_COPY_REGS
  o [SPARC64]: NULL noise removal in arch/sparc64/prom/memory.c
  o [SPARC]: sunlance iomem annotations
  o portability problem in dm-stripe.c
  o i2c compat ioctl breakage
  o megaraid_mbox fix

Andi Kleen:
  o x86-64: CONFIG_PM=n build fix
  o Fix compat shmget overflow
  o Force read implies exec for all 32bit processes in x86-64
  o Fix small vmalloc per allocation limit

Andreas Gruenbacher:
  o Long-standing xattr sharing bug

Andreas Herrmann:
  o zfcp: bugfixes (without kfree) for -bk

Andrei Konovalov:
  o ppc32: fix typos in cpm_uart_cpm2.c

Andres Salomon:
  o cpufreq_resume() fix

Andrew Chew:
  o sata_nv: enable generic class support for future NVIDIA SATA

Andrew Morton:
  o pnpacpi build fix
  o nfsd needs exportfs

Andrew Vasquez:
  o qlogic nonatomic warning fix
  o qla2xxx: fix BUG's for smp_processor_id() on interrupt

Andries E. Brouwer:
  o nls_cp936.c is not synchronized with M$'s translation table

Anton Blanchard:
  o Use MM_VM_SIZE in exit_mmap

Arjan van de Ven:
  o [ide] unexport atapi_*_bytes() and ide_read_24()

Armin Schindler:
  o Eicon driver: convert to pci_register_driver
  o Eicon driver: code cleanups
  o Eicon driver: remove ^M characters from xdi_vers.h

Arnd Bergmann:
  o SERIAL_TXX9 fix

Art Haas:
  o [SPARC32]: Fix SPIN_LOCK_UNLOCKED define

Ashok Raj:
  o [IA64] mca.c: make cpu hot add work again

Aurelien Jarno:
  o I2C: Fix DS1621 detection

Bartlomiej Zolnierkiewicz:
  o [ide] fix it8172 build for real
  o [ide] fix printk in ide_allocate_dma_engine()
  o [ide pci generic] remove dead unknown_chipset[] table from
    generic.h
  o [ide pci generic] remove dummy init_chipset_generic()
  o [ide hpt366] remove dead fifty_base_hpt374[] table
  o [ide piix] remove useless comment

Ben Dooks:
  o [ARM PATCH] 2462/1: IXP2000 - fixes for warnings from io.h
  o [ARM PATCH] 2454/1: cleanup shark_defconfig
  o [ARM PATCH] 2455/1: shark: fix uninitialised variable in head
  o [ARM PATCH] 2468/1: S3C2440 - GPIOJ12 register fix
  o [ARM PATCH] 2471/1: S3C2440 - fix S3C2440_CAMDIVN register address

Benjamin Herrenschmidt:
  o Add try_acquire_console_sem
  o update aty128fb sleep/wakeup code for new powermac changes
  o radeonfb update

Bob Breuer:
  o [SPARC]: Fix crashing of cg14 driver when serial console and vsimm
    installed
  o [CG3]: FB mmap .voff and .poff were reversed

Bodo Stroesser:
  o uml: disallow stack access below $esp like i386 / x86_64
  o uml: use PTRACE_OLDSETOPTIONS instead of PTRACE_SETOPTIONS

Brett Russ:
  o [libata scsi] verify cmd bug fixes/support

Brian King:
  o pci: Add Citrine quirk

Chas Williams:
  o [ATM]: [horizon] replace interruptible_sleep_on() with
    wait_event_interruptible()
  o [ATM]: [iphase] remove sleep_on*() usage
  o [ATM]: [zatm] replace sleep_on() with wait_event()

Christian Bornträger:
  o s390: core changes
  o s390: cpcmd interface

Christoph Hellwig:
  o add MAP_POPULATE/sys_remap_file_pages support to XFS
  o cciss: handle scsi_add_host failure

Corey Minyard:
  o Update to IPMI driver to support old DMI spec

Cornelia Huck:
  o s390: common i/o layer

Daniel E. Markle:
  o [libata sata_sil] add another Seagate drive to blacklist

Dave Airlie:
  o Invalid bound check of driver defined ioctls in drm_ioctl

Dave Jones:
  o ppc32: unbreak perfctr build
  o ibmveth inlining failure

Dave Olien:
  o raid5 and raid6 fixes to current bk tree

David Brownell:
  o USB: another usbnet ax8817x device (goodway docking station)

David Howells:
  o FRV: Make switch_to() return previous task
  o FRV: cli/sti cleanup
  o FRV: Semaphore implementation race fix
  o FRV: Add TIF_MEMDIE
  o FRV: Make the bit finding functions take const pointers
  o FRV: vmlinux.lds.S comment cleanup
  o NOMMU: Improved handling of get_unmapped_area() errors
  o NOMMU: Documentation of no-MMU mmap
  o FRV: Fix sigaltstack handling for RT signals
  o Fix the mincore() syscall

David Mosberger:
  o [IA64] clean up pt_regs accesses
  o [IA64] fix ptrace debug-register handling bug
  o [IA64] fix per-CPU MCA mess and make UP kernels work again
  o [IA64] Remove Merced B-step support
  o [IA64] ptrace.c small comment fix
  o [IA64] head.S: clean away dead code (EARLY_PRINTK)
  o [IA64] Move allocation of per-CPU MCA data out of per_cpu_init()

David S. Miller:
  o [TG3]: Update driver version and reldate
  o [SPARC64]: Consolidate pgd_cache calculations
  o [SPARC64]: atomic and bitop fixes
  o [DOC]: Add asm/atomic.h asm/bitops.h implementation specification
  o [SPARC64]: Kill spurious semicolons in some system.h macros
  o [SPARC64]: Add missing membars for xchg() and cmpxchg()
  o [SPARC64]: Correct rwlock membars
  o [DOC]: Some atomic_ops.txt updates
  o [SPARC64]: Fix off-by-one handling of size in user_fixup.c
  o [SPARC64]: Update defconfig
  o [SPARC64]: Mask off stack ptr in compat_alloc_user_space() for
    32-bit
  o [TG3]: Update driver version and reldate
  o [TCP]: Set PSH bit on all outgoing TSO frames
  o [SPARC]: nop() macro has bogus trailing semicolon
  o [DOC]: Fix typo in atomic_ops.txt
  o [TG3]: Update driver version and reldate
  o [SPARC]: Do not BUG() in srmmu_pte_pfn()

David Woodhouse:
  o USB: fix libusb endian issues
  o TASK_SIZE is variable

Dominik Brodowski:
  o pcmcia: i82365 registration failure fixup
  o pcmcia: m32 registration failure fixup

Eric Anholt:
  o drm: fix race condition in radeon driver

Fabio Massimo Di Nitto:
  o x86_64: parse noexec=[on|off]

Fanny Wakizaka:
  o avma1_cs: Inverted parameter order in outb

Gerd Knorr:
  o DVB: No signal with bt848/tda9887
  o tv-card tuner fixup

Grant Grundler:
  o [TG3]: Clean up grc_local_ctrl usage

Greg Kroah-Hartman:
  o PCI: add linux-pci mailing list to PCI maintainers entry
  o Update greg's email address

Hannes Reinecke:
  o s390: compat SI_TIMER conversion

Herbert Xu:
  o [XFRM]: Fix inverted strcmp() test in xfrm_get_byname()
  o [NET]: Add missing memory barrier to kfree_skb()
  o [NET]: Add barriers for dst refcnt

Hermann Kneissel:
  o USB: garmin_gps tweak

Hideaki Yoshifuji:
  o [IPV6]: Fix tunnel list locking in ip6_tunnel.c
  o [NET]: Use TASK_COMM_LEN instead of magic constant

Horst Hummel:
  o s390: dasd i/o scheduler & debug logs

Hugh Dickins:
  o tmpfs caused truncate BUG
  o remove truncate mapped BUG
  o do_munmap() hugetlb fix
  o general split_vma hugetlb fix

Ingo Molnar:
  o add design comment to kick_process()

James Bottomley:
  o SCSI: fix HBA removal problem with transport classes

James Lamanna:
  o s390: vfree checking cleanup

Jan Kara:
  o Fix reiserfs quota SMP locks

Jarno Paananen:
  o [libata sata_promise] add PCI ID for new SATAII TX2 card

Jean Delvare:
  o I2C: Resolve resource conflict between i2c-viapro and via686a
  o I2C: Use standard temperature converters for as99127f
  o I2C: Reduce it87 i2c address range
  o I2C: Fix i2c-sis5595 pci configuration accesses
  o I2C: Do not show disabled pc87360 fans
  o I2C: Prevent buffer overflow on SMBus block read in
  o [ide] fix hwif_init() to not return error for "empty" interfaces

Jeff Dike:
  o UML: remove not-yet-merged system calls
  o uml: Fix SKAS sig-handler reentrancy
  o uml: fix jiffies initialization
  o uml: fix broken #ifdef clause causing crashes
  o uml: fix STATIC_LINK compilation
  o uml: fix x86_64 submode compilation
  o uml: fix makefile typo

Jeff Garzik:
  o [libata] add DMA blacklist
  o [libata] Remove CDROM drive from PATA DMA blacklist
  o [libata sata_promise] support Promise SATAII TX2/TX4 cards
  o [libata ahci] Add support for ULi M5288
  o [block sx8] fix warning
  o [BK] ignore drivers/md/raid6altivec[1248].c
  o [gen_init_cpio] When outputting a buffer, don't use char-at-a-time
    I/O

Jens Axboe:
  o md sync_page_io bio leak

Jesse Barnes:
  o [IA64-SGI] move shubio.h into include/asm-ia64/sn/

Jimi Xenidis:
  o Fix devfs name for the hvcs driver

John Rose:
  o PCI Hotplug: remove
...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Enrico Bartky  
View profile
 More options Feb 13 2005, 8:10 am
Newsgroups: linux.kernel
From: Enrico Bartky <DOSPr...@web.de>
Date: Sun, 13 Feb 2005 14:10:12 +0100
Local: Sun, Feb 13 2005 8:10 am
Subject: Re: Linux 2.6.11-rc4
Hello,

It is possible to include the SIS5595 chip driver to the final release?

EnricoB
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Francois Romieu  
View profile
 More options Feb 13 2005, 8:40 am
Newsgroups: linux.kernel
From: Francois Romieu <rom...@fr.zoreil.com>
Date: Sun, 13 Feb 2005 14:40:09 +0100
Local: Sun, Feb 13 2005 8:40 am
Subject: Re: Linux 2.6.11-rc4
Linus Torvalds <torva...@osdl.org> :
[...]

> this is hopefully the last -rc kernel before the real 2.6.11, so please
> give it a whirl, and complain loudly about anything broken.

- dscc4 (patch in Jeff's -netdev)
  Apart the fact that the driver crashes on module insertion and is
  unusable, users do not complain so this is a minor annoyance from
  a maintainer's pov :o)

- r8169 (patches available on netdev, sent to Jeff and Andrew)
  rtl8169_open() after rtl8169_close() sucks.

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Check return of copy_from_user value in cifssmb.c [Re: Linux 2.6.11-rc4]" by Luca
Luca  
View profile
 More options Feb 13 2005, 10:50 am
Newsgroups: linux.kernel
From: Luca <kro...@kronoz.cjb.net>
Date: Sun, 13 Feb 2005 16:50:08 +0100
Local: Sun, Feb 13 2005 10:50 am
Subject: [PATCH 2.6] Check return of copy_from_user value in cifssmb.c [Re: Linux 2.6.11-rc4]
Linus Torvalds <torva...@osdl.org> ha scritto:

> this is hopefully the last -rc kernel before the real 2.6.11, so please
> give it a whirl, and complain loudly about anything broken.

The following patch against 2.6.11-rc4 fixes this compile time warning:

fs/cifs/cifssmb.c: In function `CIFSSMBWrite':
fs/cifs/cifssmb.c:902: warning: ignoring return value of
`copy_from_user', declared with attribute warn_unused_result

It also fixes the strange indentation of the code in that point. Also
note that pSMB cannot be NULL, since the return value of smb_init (which
initiliaze pSMB) is checked (see line 874).

Signed-off-by: Luca Tettamanti <kro...@kronoz.cjb.net>

--- a/fs/cifs/cifssmb.c 2005-02-03 17:43:18.000000000 +0100
+++ b/fs/cifs/cifssmb.c 2005-02-03 17:47:29.000000000 +0100
@@ -896,14 +896,17 @@
        pSMB->DataLengthHigh = 0;
        pSMB->DataOffset =
            cpu_to_le16(offsetof(struct smb_com_write_req,Data) - 4);
-    if(buf)
-           memcpy(pSMB->Data,buf,bytes_sent);
-       else if(ubuf)
-               copy_from_user(pSMB->Data,ubuf,bytes_sent);
-    else {
-               /* No buffer */
-               if(pSMB)
+
+       if(buf)
+               memcpy(pSMB->Data, buf, bytes_sent);
+       else if(ubuf) {
+               if (copy_from_user(pSMB->Data, ubuf, bytes_sent)) {
                        cifs_buf_release(pSMB);
+                       return -EFAULT;
+               }
+       } else {
+               /* No buffer */
+               cifs_buf_release(pSMB);
                return -EINVAL;
        }

Luca
--
Home: http://kronoz.cjb.net
Il dottore mi ha detto di smettere di fare cene intime per quattro.
A meno che non ci siamo altre tre persone.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Check return value of copy_to_user in fs/cifs/file.c [Re: Linux 2.6.11-rc4]" by Luca
Luca  
View profile
 More options Feb 13 2005, 10:50 am
Newsgroups: linux.kernel
From: Luca <kro...@kronoz.cjb.net>
Date: Sun, 13 Feb 2005 16:50:10 +0100
Local: Sun, Feb 13 2005 10:50 am
Subject: [PATCH 2.6] Check return value of copy_to_user in fs/cifs/file.c [Re: Linux 2.6.11-rc4]
Linus Torvalds <torva...@osdl.org> ha scritto:

> this is hopefully the last -rc kernel before the real 2.6.11, so please
> give it a whirl, and complain loudly about anything broken.

The following patch against 2.6.11-rc4 fixes this compile time warning:

 CC [M]  fs/cifs/file.o
fs/cifs/file.c: In function `cifs_user_read':
fs/cifs/file.c:1168: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result

I also added an explicit check for errors other than -EAGAIN, since
CIFSSMBRead may return -ENOMEM if it's unable to allocate smb_com_read_rsp;
in that case we don't want to call copy_to_user with a NULL pointer.

Signed-off-by: Luca Tettamanti <kro...@kronoz.cjb.net>

--- a/fs/cifs/file.c    2005-02-03 17:58:07.000000000 +0100
+++ b/fs/cifs/file.c    2005-02-03 18:17:37.000000000 +0100
@@ -1151,7 +1151,7 @@
                current_read_size = min_t(const int,read_size - total_read,cifs_sb->rsize);
                rc = -EAGAIN;
                smb_read_data = NULL;
-               while(rc == -EAGAIN) {
+               while(1) {
                        if ((open_file->invalidHandle) && (!open_file->closePend)) {
                                rc = cifs_reopen_file(file->f_dentry->d_inode,
                                        file,TRUE);
@@ -1164,13 +1164,22 @@
                                 current_read_size, *poffset,
                                 &bytes_read, &smb_read_data);

+                       if (rc == -EAGAIN)
+                               continue;
+                       else
+                               break;
+
                        pSMBr = (struct smb_com_read_rsp *)smb_read_data;
-                       copy_to_user(current_offset,smb_read_data + 4/* RFC1001 hdr*/
+                       rc = copy_to_user(current_offset,smb_read_data + 4/* RFC1001 hdr*/
                                + le16_to_cpu(pSMBr->DataOffset), bytes_read);
                        if(smb_read_data) {
                                cifs_buf_release(smb_read_data);
                                smb_read_data = NULL;
                        }
+                       if (rc) {
+                               FreeXid(xid);
+                               return -EFAULT;
+                       }
                }
                if (rc || (bytes_read == 0)) {
                        if (total_read) {

Luca
--
Home: http://kronoz.cjb.net
Se non sei parte della soluzione, allora sei parte del problema.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Linux 2.6.11-rc4" by Jean Delvare
Jean Delvare  
View profile
 More options Feb 13 2005, 11:20 am
Newsgroups: linux.kernel
From: Jean Delvare <kh...@linux-fr.org>
Date: Sun, 13 Feb 2005 17:20:08 +0100
Local: Sun, Feb 13 2005 11:20 am
Subject: Re: Linux 2.6.11-rc4
Hi Enrico,

> It is possible to include the SIS5595 chip driver to the final
> release?

No, sorry. It's not even in -mm yet (in fact it's even not in Greg's
bk-i2c tree yet). It needs to spend some time (and get some testing) in
-mm before it can go to Linus.

You are still welcome to get the patch [1] and apply it manually to your
tree if you want support right now. And of course, report to the
Aurélien and the sensors mailing-list if you hit a problem.

[1] http://lkml.org/lkml/diff/2005/2/6/192/1

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Check return value of copy_to_user in fs/cifs/file.c [Re: Linux 2.6.11-rc4]" by Marcel Sebek
Marcel Sebek  
View profile
 More options Feb 13 2005, 12:40 pm
Newsgroups: linux.kernel
From: sebe...@post.cz (Marcel Sebek)
Date: Sun, 13 Feb 2005 18:40:09 +0100
Local: Sun, Feb 13 2005 12:40 pm
Subject: Re: [PATCH 2.6] Check return value of copy_to_user in fs/cifs/file.c [Re: Linux 2.6.11-rc4]

                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Perhaps this line and the following lines are never executed with your
patch, am I right?

--
Marcel Sebek
jabber: se...@jabber.cz                     ICQ: 279852819
linux user number: 307850                 GPG ID: 5F88735E
GPG FP: 0F01 BAB8 3148 94DB B95D  1FCA 8B63 CA06 5F88 735E

  signature.asc
< 1K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luca  
View profile
 More options Feb 13 2005, 3:30 pm
Newsgroups: linux.kernel
From: Luca <kro...@kronoz.cjb.net>
Date: Sun, 13 Feb 2005 21:30:17 +0100
Local: Sun, Feb 13 2005 3:30 pm
Subject: Re: [PATCH 2.6] Check return value of copy_to_user in fs/cifs/file.c [Re: Linux 2.6.11-rc4]
Il Sun, Feb 13, 2005 at 06:28:38PM +0100, Marcel Sebek ha scritto:

> > @@ -1164,13 +1164,22 @@
> >                                current_read_size, *poffset,
> >                                &bytes_read, &smb_read_data);

> > +                     if (rc == -EAGAIN)
> > +                             continue;
> > +                     else
> > +                             break;
> > +
> >                       pSMBr = (struct smb_com_read_rsp *)smb_read_data;
>                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Perhaps this line and the following lines are never executed with your
> patch, am I right?

Yes, you are. Let's try again:

The following patch against 2.6.11-rc4 fixes this compile time
warning:

 CC [M]  fs/cifs/file.o
fs/cifs/file.c: In function `cifs_user_read':
fs/cifs/file.c:1168: warning: ignoring return value of
`copy_to_user', declared with attribute warn_unused_result

I also added an explicit check for errors other than -EAGAIN, since
CIFSSMBRead may return -ENOMEM if it's unable to allocate
smb_com_read_rsp; in that case we don't want to call copy_to_user with a
NULL pointer.

Signed-off-by: Luca Tettamanti <kro...@kronoz.cjb.net>

--- a/fs/cifs/file.c    2005-02-03 17:58:07.000000000 +0100
+++ b/fs/cifs/file.c    2005-02-13 21:18:01.000000000 +0100
@@ -1151,7 +1151,7 @@
                current_read_size = min_t(const int,read_size - total_read,cifs_sb->rsize);
                rc = -EAGAIN;
                smb_read_data = NULL;
-               while(rc == -EAGAIN) {
+               while(1) {
                        if ((open_file->invalidHandle) && (!open_file->closePend)) {
                                rc = cifs_reopen_file(file->f_dentry->d_inode,
                                        file,TRUE);
@@ -1164,13 +1164,22 @@
                                 current_read_size, *poffset,
                                 &bytes_read, &smb_read_data);

+                       if (rc == -EAGAIN)
+                               continue;
+                       if (rc)
+                               break;
+
                        pSMBr = (struct smb_com_read_rsp *)smb_read_data;
-                       copy_to_user(current_offset,smb_read_data + 4/* RFC1001 hdr*/
+                       rc = copy_to_user(current_offset,smb_read_data + 4/* RFC1001 hdr*/
                                + le16_to_cpu(pSMBr->DataOffset), bytes_read);
                        if(smb_read_data) {
                                cifs_buf_release(smb_read_data);
                                smb_read_data = NULL;
                        }
+                       if (rc) {
+                               FreeXid(xid);
+                               return -EFAULT;
+                       }
                }
                if (rc || (bytes_read == 0)) {
                        if (total_read) {

Luca
--
Home: http://kronoz.cjb.net
"La teoria e` quando sappiamo come funzionano le cose ma non funzionano.
 La pratica e` quando le cose funzionano ma non sappiamo perche`.
 Abbiamo unito la teoria e la pratica: le cose non funzionano piu` e non
 sappiamo il perche`." -- A. Einstein
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.